This is system image that runs systemd and provides a basic system for testing and development purposes, such as testing ansible role using molecule. The image is built on top of the official CentOS 7 image. It is systemd enabled and ready to test Ansible roles with Molecule or develop some software/infra with other tools.
docker run --name systemd --tmpfs /tmp --tmpfs /run -v /sys/fs/cgroup:/sys/fs/cgroup:ro -d fleurdeviande/centos-systemd
Note that systemd expects /run
and /tmp
to be writable and /sys/fs/cgroup
mounted and readable.
Due issue with cgroupv2 on MacOS with M1 and Docker 4.11.1 (84025)
described here
to successfully run the systemd container, you need to switch back on cgroupv1 by adding "deprecatedCgroupv1": true
to
~/Library/Group\ Containers/group.com.docker/settings.json
file and restart Docker.
We need to run socat to forward the logs from systemd stream to the docker logs so that you can see everything
from the docker logs
command.
- systemd
- ansible
- net-tools
- iproute
- sysstat
- nano
- htop
- openssh-clients
- bash-completion
- tcpdump
- vim
- socat