Docker containers for systemd testing on Debian based OS.
❯ docker build . -t systemd-debian-sid --build-args base_system=debian:sid
Example base_system
arguments :
debian:10
debian:sid
ubuntu:18.04
ubuntu:20.04
The following containers are available from Docker Hub.
❯ docker pull fauust/docker-systemd:debian-10
❯ docker pull fauust/docker-systemd:debian-sid
❯ docker pull fauust/docker-systemd:ubuntu-18.04
❯ docker pull fauust/docker-systemd:ubuntu-20.04
For systemd to start, it is necessary to:
- share the volume
/sys/fs/cgroup
with container (use read-only mode); - run the container in
privileged
mode.
❯ docker run --name sys-test --privileged -d -v /sys/fs/cgroup:/sys/fs/cgroup:ro fauust/docker-systemd:debian-10
❯ docker exec -it sys-test bash
root@59c9e3e924e7:/# apt update && apt install procps
...
root@59c9e3e924e7:/# ps fax
PID TTY STAT TIME COMMAND
34 pts/0 Ss 0:00 bash
420 pts/0 R+ 0:00 \_ ps fax
1 ? Ss 0:00 /lib/systemd/systemd
24 ? Ss 0:00 /lib/systemd/systemd-journald
For testing purposes only, do not use in production!