Centossystemd与Docker冲突问题的示例分析

这篇文章给大家分享的是有关Centos systemd与Docker冲突问题的示例分析的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。

成都创新互联公司是一家专业提供察布查尔锡伯企业网站建设,专注与成都网站建设、成都做网站、HTML5、小程序制作等业务。10年已为察布查尔锡伯众多企业、政府机构等服务。创新互联专业网络公司优惠进行中。

首先欣赏一下Red Hat与Docker团队间的撕逼,http://www.open-open.com/news/view/117a7d2 从这个帖子看出来Centos7.1.1053版本的docker镜像是木有systemd的,so,在网上找到另一个帖子,http://www.tuicool.com/articles/6RRvQbi ,参考其给出的办法。

1. docker pull centos:7.1.1053 拉取一个7.1.1053版本的docker镜像

2. 自己写一个Dockerfile

# cat Dockerfile 
FROM centos:7.1.1503
MAINTAINER "you" 
ENV container docker
RUN yum -y swap -- remove fakesystemd -- install systemd systemd-libs
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/*;

3. 执行下面的命令做版本

docker build --rm -t centos7.1-systemd .

4. docker run

感谢各位的阅读!关于“Centos systemd与Docker冲突问题的示例分析”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,让大家可以学到更多知识,如果觉得文章不错,可以把它分享出去让更多的人看到吧!


新闻标题:Centossystemd与Docker冲突问题的示例分析
分享路径:http://lszwz.com/article/gcicgi.html

其他资讯

售后响应及时

7×24小时客服热线

数据备份

更安全、更高效、更稳定

价格公道精准

项目经理精准报价不弄虚作假

合作无风险

重合同讲信誉,无效全额退款