blob: 1d2eadd15255e0cbd83e26da626d310a4dbe6ce1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# Based on the amazing work of geerlingguy <3
# FROM docker.io/geerlingguy/docker-ubuntu2404-ansible
FROM docker.io/library/ubuntu:noble-20250910
ARG DEBIAN_FRONTEND=noninteractive
ENV container docker
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
locales systemd avahi-daemon dhcpcd python3 iproute2 ifupdown udev \
&& rm -Rf /var/lib/apt/lists/* \
&& rm -Rf /usr/share/doc \
&& rm -Rf /usr/share/man \
&& apt-get clean
# Fix potential UTF-8 errors with ansible-test.
RUN locale-gen en_US.UTF-8
# Remove unnecessary getty target that result in high CPU usage when using
# multiple containers with Molecule (https://github.com/ansible/molecule/issues/1104)
# Keeping the udev because the gateway role depends on that
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"]
|