Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

An example Analysis of the conflict between Centos systemd and Docker

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report