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

Docker (centos7) pure command installation patch

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

1. Install dependency packages

Yum install-y yum-utils\

Device-mapper-persistent-data\

Lvm2

two。 Configure the image source (using the mirror station of China University of Science and Technology)

Change to the repo directory:

Cd / etc/yum.repo.d/

Add a certificate:

Wget http://mirrors.ustc.edu.cn/docker-ce/linux/centos/gpg

Rpm-import gpg

Download docker-repo:

Wget http://mirrors.ustc.edu.cn/docker-ce/linux/centos/docker-ce.repo

Replace the official address (edit mode):

Vim docker-ce.repo

% s:download.docker.com:mirrors.ustc.edu.cn\ / docker-ce:g

3. Update cache, install docker

Yum makecache

Yum install docker-ce-y

4. Set up boot boot

Systemctl enable docker

Systemctl start docker

5. Configure docker Image Accelerator (you can apply for Aliyun's exclusive Accelerator, location: container Image Service)

Vim / etc/docker/daemon.json

{

"registry-mirrors": [

"https://registry.docker-cn.com"

]

}

Systemctl daemon-reload

Systemctl restart docker

6. Open your hello-world!

Docker run hello-world

6. Basically completed, the main purpose is to record, easy to paste and copy. The next step is to make a script and wait for the update.

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