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

Centos7 builds the docker environment.

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

Share

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

1. Prepare for work, (update the yum feed if there is a problem with the yum feed. )

Mv / etc/yum.repos.d/CentOS-Base.repo / etc/yum.repos.d/CentOS-Base.repo.backup

Replace Ali Cloud Mirror Source

Wget-O / etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

Or use the NetEase mirror source (this is recommended. Recently, the Ali image source has been extracted and often cannot be accessed)

Wget-O / etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo

Run yum makecache to generate cache

Run yum update to update the system, which is a slow process

2.yum installs docker.

Yum install docker-io

3. After the installation is complete, start docker.

Service docker start

This step may fail to start for a long time because selinux is not turned off.

4. Start the container to report an error.

Solution: systemctl stop docker / / stop the docker service

Rm-rf / var/lib/docker / / notice that the image of docker images will be removed

Vi / etc/sysconfig/docker-storage / / change the overlay2 in the file to overlay

DOCKER_STORAGE_OPTIONS= "--storage-driver overlay"

Vi / etc/sysconfig/docker / / remove the selinux-enabled after option

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