11-17 3 views
> vim Dockerfile
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
FROM centos:7 ENV container docker 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/*; # Default time zone to Asia/Shanghai RUN ln -sfT /usr/share/zoneinfo/Asia/Shanghai /etc/localtime CMD ["/usr/sbin/init"] |
1 2 |
docker build --rm -t local/c7-systemd . docker run --privileged -ti --name c7 local/c7-systemd |
如果想赏钱,可以用微信扫描下面的二维码,一来能刺激我写博客的欲望,二来好维护云主机的费用; 另外再次标注博客原地址 itnotebooks.com 感谢!