Update systemd template
This commit is contained in:
parent
07568198f7
commit
27be13736a
@ -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"]
|
||||
|
@ -7,4 +7,5 @@ Copy Dockerfile somewhere and build the image:
|
||||
`$ docker build --rm -t <username>/systemd .`
|
||||
|
||||
And launch the systemd container:
|
||||
`docker run -it <username>/systemd`
|
||||
`docker run -d --name systemd --tmpfs /tmp --tmpfs /run --tmpfs /run/lock -v /sys/fs/cgroup:/sys/fs/cgroup:ro <username>/systemd`
|
||||
`docker exec -it systemd bash`
|
||||
|
Loading…
Reference in New Issue
Block a user