summaryrefslogtreecommitdiffstats
path: root/molecule/default/Dockerfile.ubuntu-resolute.j2
blob: 1e52cb3fdb7d7c5b470b27159c36d8f8b2581ff2 (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
# Based on the amazing work of geerlingguy <3
# FROM docker.io/geerlingguy/docker-ubuntu2404-ansible
FROM docker.io/library/ubuntu:resolute

ARG DEBIAN_FRONTEND=noninteractive

ENV container docker

RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        locales systemd python3 parted dosfstools \
    && apt-get clean \
    && rm -Rf /var/lib/apt/lists/* \
    && rm -Rf /usr/share/doc \
    && rm -Rf /usr/share/man

# Fix potential UTF-8 errors with ansible-test.
RUN locale-gen en_US.UTF-8

# Remove unnecessary getty and udev targets that result in high CPU usage when using
# multiple containers with Molecule (https://github.com/ansible/molecule/issues/1104)
RUN rm -f /lib/systemd/system/systemd*udev* \
  && rm -f /lib/systemd/system/getty.target

VOLUME ["/sys/fs/cgroup", "/tmp", "/run", "/opt"]

CMD ["/lib/systemd/systemd"]