diff --git a/org/alt/systemd/Dockerfile.template b/org/alt/systemd/Dockerfile.template index d663ca8..2c1d961 100644 --- a/org/alt/systemd/Dockerfile.template +++ b/org/alt/systemd/Dockerfile.template @@ -2,7 +2,9 @@ FROM {{ registry }}{{ organization }}/base:{{ branch }} MAINTAINER alt-cloud -{{ install_pakages("systemd") }} +ENV container docker + +{{ install_pakages("systemd-sysvinit") }} RUN ( \ cd /lib/systemd/system/sysinit.target.wants/; \ @@ -17,4 +19,6 @@ RUN ( \ rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ rm -f /lib/systemd/system/basic.target.wants/*; +VOLUME ["/sys/fs/cgroup"] + CMD ["/sbin/init"] diff --git a/org/alt/systemd/README.md b/org/alt/systemd/README.md index 131117d..823e731 100644 --- a/org/alt/systemd/README.md +++ b/org/alt/systemd/README.md @@ -7,4 +7,5 @@ Copy Dockerfile somewhere and build the image: `$ docker build --rm -t /systemd .` And launch the systemd container: -`docker run -it /systemd` +`docker run -d --name systemd --tmpfs /tmp --tmpfs /run --tmpfs /run/lock -v /sys/fs/cgroup:/sys/fs/cgroup:ro /systemd` +`docker exec -it systemd bash`