forked from maci0/docker-systemd-unpriv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
27 lines (19 loc) · 921 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
FROM centos:centos7
MAINTAINER Marcel Wysocki "[email protected]"
ENV container docker
RUN yum -y update; yum clean all
RUN yum -y swap -- remove fakesystemd -- install systemd systemd-libs
RUN systemctl mask dev-mqueue.mount dev-hugepages.mount \
systemd-remount-fs.service sys-kernel-config.mount \
sys-kernel-debug.mount sys-fs-fuse-connections.mount
RUN systemctl mask display-manager.service systemd-logind.service
RUN systemctl disable graphical.target; systemctl enable multi-user.target
ADD dbus.service /etc/systemd/system/dbus.service
#RUN yum -y install passwd; yum clean all
#RUN echo root | passwd --stdin root
#RUN yum -y install openssh-server initscripts; yum clean all
#RUN echo "UseDNS no" >> /etc/ssh/sshd_config
#RUN sed -i 's/UsePrivilegeSeparation sandbox/UsePrivilegeSeparation no/' /etc/ssh/sshd_config
VOLUME ["/sys/fs/cgroup"]
VOLUME ["/run"]
CMD ["/usr/lib/systemd/systemd"]