LHJ's Blog

🖋 在CentOS 7上安装Docker

🐳 1. 更新yum

1
sudo yum update

🐳 2. 安装依赖

1
sudo yum install -y yum-utils device-mapper-persistent-data lvm2

🐳 3. 设置yum源

1
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

🐳 4. 安装docker

1
sudo yum install docker-ce

🐳 5. 设置开机启动

1
2
sudo systemctl start docker
sudo systemctl enable docker

 评论