02-Docker-安装
banner 2020-08-02 22:14:49 docker
# CentOS7安装Docker
# Uninstall old versions
sudo yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
# Install using the repository
yum install -y yum-utils
yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
1
2
3
4
5
2
3
4
5
# INSTALL DOCKER ENGINE
yum install docker-ce docker-ce-cli containerd.io
1
# Start Docker
systemctl start docker
1
# Verify Docker
docker run hello-world
1
# 设置开机自启
systemctl enable docker
1
# 镜像加速
- 网易云镜像仓库
- 阿里云镜像仓库 推荐使用阿里云镜像仓库,镜像加速 (opens new window)。