Public Repository

Last pushed: a year ago
Short Description
CentOS base container with systemd
Full Description

Supported tags and respective Dockerfile links

Example systemd enabled app container

In order to use the systemd enabled base container, you will need to create your Dockerfile similar to the one below.

FROM mkubenka/centos-systemd
RUN yum -y install httpd; yum clean all; systemctl enable httpd.service
EXPOSE 80
CMD ["/usr/sbin/init"]

Build this image:

$ docker build --rm -t local/c7-systemd-httpd

Running a systemd enabled app container

In order to run a container with systemd, you will need to mount the cgroups volumes from the host. Below is an example command that will run the systemd enabled httpd container created earlier.

$ docker run -ti -v /sys/fs/cgroup:/sys/fs/cgroup:ro -p 80:80 local/c7-systemd-httpd

This container is running with systemd in a limited context, with the cgroups filesystem mounted. There have been reports that if you're using an Ubuntu host, you will need to add -v /tmp/$(mktemp -d):/run in addition to the cgroups mount.

On OSX/macOS:

$ docker run -ti --cap-add=SYS_ADMIN --security-opt=seccomp:unconfined --stop-signal=SIGRTMIN+3 -p 80:80 local/c7-systemd-httpd
Docker Pull Command
Owner
mkubenka