Docker installed on centos

Fedora / CentOS / RHEL The
following content is modified from official documents.

If you have installed docker before, please delete it first

sudo yum remove docker docker-common docker-selinux docker-engine
Install some dependencies

sudo yum install -y yum-utils device-mapper-persistent-data lvm2
Download the repo file according to your distribution:
wget -O /etc/yum.repos.d/docker-ce.repo https://download.docker.com/linux/centos/docker-ce.repo
replace the software warehouse address with TUNA:

sudo sed -i 's+download.docker.com+mirrors.tuna.tsinghua.edu.cn/docker-ce+' /etc/yum.repos.d/docker-ce.repo
Finally install:

sudo yum makecache fast
sudo yum install docker-ce

Published 44 original articles · liked 0 · visits 1226

Guess you like

Origin blog.csdn.net/weixin520520/article/details/105001836