Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Run a full Debian OS inside a Docker container

License

Notifications You must be signed in to change notification settings

alehaa/docker-debian-systemd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Systemd-enabled Debian image for Docker

pipeline status Docker Pulls

About

This Docker image enhances the Debian image to be run like a VM or LXC container including systemd as init system and other utilities.

In addition to systemd cron and anacron will be installed. However, in contrast to the official Debian CD, rsyslog will NOT be installed, as journald should fit most needs.

The image is provided as multi arch image. At the moment the i386, amd64, arm and arm64 architectures are enabled.

Usage

For Debian stretch run:

docker run -d -it                       \
    -v /sys/fs/cgroup:/sys/fs/cgroup:ro \
    --cap-add SYS_ADMIN                 \
    alehaa/debian-systemd:stretch

Run at Docker for Mac

As the image mounts the systemd cgroup into the container, the host needs to have it mounted already. However, boot2docker doesn't have systemd installed and therefore this cgroup isn't available.

To get the cgroup mounted in the Docker VM, you can login into the VM by running docker-machine ssh and run the following code to apply the patch:

sudo -s
cat >> /var/lib/boot2docker/bootsync.sh <<EOF
mkdir /sys/fs/cgroup/systemd
mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd
EOF
exit

Autobuild

At the moment, this image does NOT support autobuild, as (at the time of writing this) the Docker cloud does not support multiarch builds. However, this image will be updated on a regular basis by scheduled builds.

License

This project is licensed under the MIT License.

© 2018-2019 Alexander Haase

About

Run a full Debian OS inside a Docker container

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published