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

How to build Docker environment under CentOS7

2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article mainly introduces the relevant knowledge of how to build the Docker environment under CentOS7, the content is detailed and easy to understand, the operation is simple and fast, and has a certain reference value. I believe you will gain something after reading this article on how to build the Docker environment under CentOS7. Let's take a look.

Docker is an open source, lightweight container engine that runs on Linux and Windows for creating, managing, and orchestrating containers. Compared with VMware virtual machines, Docker uses containers to host applications instead of the operating system, so it has little overhead and high performance.

1 、 Remove the old version: yum remove docker\ docker-client\ docker-client-latest\ docker-common\ docker-latest\ docker-latest-logrotate\ docker-logrotate\ docker-selinux\ docker-engine-selinux\ Docker-enginerm-rf / etc/systemd/system/docker.service.drm-rf / var/lib/dockerrm-rf / var/run/dockerrm-rf / usr/local/dockerrm-rf / etc/docker2, Install some necessary system tools: yum- y install yum-utils device-mapper-persistent-data lvm23, add software source information: yum-config-manager-add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo4, update yum cache: yum makecache fast5, install Docker-ce:yum-y install docker-ce6, start Docker background service: systemctl start docker7, test run hello-world:docker run hello-world8, install centos And run centos:docker run-itd centos / bin/bash9 in the way of background startup, Enter the centos image: [root@myserver ~] # docker psCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMESf57d4703adc3 centos "/ bin/bash" About a minute ago Up About a minute jolly_ dhawan [root @ myserver ~] # docker exec-it f57d4703adc3 / bin/bash [root@f57d4703adc3 /] # [ Root@f57d4703adc3 /] # cat / etc/RedHat-releaseCentOS Linux release 7.6.1810 (Core) [root@f57d4703adc3 /] # this is the end of the article on "how to build a Docker environment under CentOS7" Thank you for reading! I believe you all have a certain understanding of the knowledge of "how to build a Docker environment under CentOS7". If you want to learn more, you are welcome to follow the industry information channel.

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

Development

Wechat

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

12
Report