An example Analysis of the conflict between Centos systemd and Docker
This article shares with you the content of an example analysis of the conflict between Centos systemd and Docker. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
First of all, take a look at the rivalry between Red Hat and the Docker team. Http://www.open-open.com/news/view/117a7d2 can see from this post that the Centos7.1.1053 version of docker image is not systemd, so, find another post on the Internet, http://www.tuicool.com/articles/6RRvQbi, refer to its method.
1. Docker pull centos:7.1.1053 pulls an docker image of version 7.1.1053
two。 Write your own Dockerfile.
# cat Dockerfile FROM centos:7.1.1503MAINTAINER "you" ENV container dockerRUN yum-y swap-- remove fakesystemd-- install systemd systemd-libsRUN (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/*
3. Execute the following command to make the version
Docker build-rm-t centos7.1-systemd.
4. Docker run
Thank you for reading! This is the end of the article on "sample Analysis of the conflict between Centos systemd and Docker". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!