summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--molecule/debian/Dockerfile.j26
-rw-r--r--molecule/proxmox/Dockerfile.j26
-rw-r--r--molecule/ubuntu/Dockerfile.j26
3 files changed, 18 insertions, 0 deletions
diff --git a/molecule/debian/Dockerfile.j2 b/molecule/debian/Dockerfile.j2
index 2e047439..dd5b1778 100644
--- a/molecule/debian/Dockerfile.j2
+++ b/molecule/debian/Dockerfile.j2
@@ -20,6 +20,12 @@ RUN rm -f /lib/systemd/system/multi-user.target.wants/getty.target
RUN systemctl enable avahi-daemon \
&& touch /etc/locale.gen
+# dhcpcd never gets a real lease on podman's virtual network (no DHCP
+# server to answer it) and clobbers /etc/resolv.conf with an empty file,
+# breaking DNS for later apt-get tasks. Mask it here; the network role
+# still purges the dhcpcd package itself later as part of its real logic.
+RUN systemctl mask dhcpcd.service
+
VOLUME ["/sys/fs/cgroup", "/tmp", "/run", "/opt"]
CMD ["/lib/systemd/systemd"]
diff --git a/molecule/proxmox/Dockerfile.j2 b/molecule/proxmox/Dockerfile.j2
index 39de5170..4c3cc008 100644
--- a/molecule/proxmox/Dockerfile.j2
+++ b/molecule/proxmox/Dockerfile.j2
@@ -24,6 +24,12 @@ RUN rm -f /lib/systemd/system/multi-user.target.wants/getty.target
RUN systemctl enable avahi-daemon \
&& touch /etc/locale.gen
+# dhcpcd never gets a real lease on podman's virtual network (no DHCP
+# server to answer it) and clobbers /etc/resolv.conf with an empty file,
+# breaking DNS for later apt-get tasks. Mask it here; the network role
+# still purges the dhcpcd package itself later as part of its real logic.
+RUN systemctl mask dhcpcd.service
+
VOLUME ["/sys/fs/cgroup", "/tmp", "/run", "/opt"]
CMD ["/lib/systemd/systemd"]
diff --git a/molecule/ubuntu/Dockerfile.j2 b/molecule/ubuntu/Dockerfile.j2
index 64070d4d..1d2eadd1 100644
--- a/molecule/ubuntu/Dockerfile.j2
+++ b/molecule/ubuntu/Dockerfile.j2
@@ -25,6 +25,12 @@ RUN rm -f /lib/systemd/system/getty.target
# Mimic Ubuntu OS default boot (for testing)
RUN systemctl enable avahi-daemon
+# dhcpcd never gets a real lease on podman's virtual network (no DHCP
+# server to answer it) and clobbers /etc/resolv.conf with an empty file,
+# breaking DNS for later apt-get tasks. Mask it here; the network role
+# still purges the dhcpcd package itself later as part of its real logic.
+RUN systemctl mask dhcpcd.service
+
VOLUME ["/sys/fs/cgroup", "/tmp", "/run", "/opt"]
CMD ["/lib/systemd/systemd"]