boma/.docker/molecule-debian13/Dockerfile

26 lines
832 B
Text
Raw Permalink Normal View History

FROM debian:trixie-slim
# Required by Molecule's Docker driver to detect we're in a container
ENV container=docker
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update -qq \
&& apt-get install -y --no-install-recommends \
python3 \
sudo \
systemd \
systemd-sysv \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
# Remove units that fail or are irrelevant inside a container
&& rm -f \
/lib/systemd/system/multi-user.target.wants/* \
/lib/systemd/system/local-fs.target.wants/* \
/lib/systemd/system/sockets.target.wants/*udev* \
/lib/systemd/system/sockets.target.wants/*initctl* \
/lib/systemd/system/sysinit.target.wants/systemd-tmpfiles-setup* \
/etc/systemd/system/*.wants/*
VOLUME ["/sys/fs/cgroup"]
CMD ["/lib/systemd/systemd"]