Comment 2 for bug 1530915

Revision history for this message
Sergii Golovatiuk (sgolovatiuk) wrote :

If we look at containers precisely they run a lot of services that must be disabled by default. It kills a container way. xinetd, crond, rsyslogd must be stopped and removed from container. They were started by multi-user.target

I see the most easiest way is to change Dockerfile as

RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
rm -f /lib/systemd/system/multi-user.target.wants/*;\
rm -f /etc/systemd/system/*.wants/*;\
rm -f /lib/systemd/system/local-fs.target.wants/*; \
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
rm -f /lib/systemd/system/basic.target.wants/*;\
rm -f /lib/systemd/system/anaconda.target.wants/*;
VOLUME [ “/sys/fs/cgroup” ]
CMD [“/usr/sbin/init”]