1. 安装
https://www.runoob.com/docker/centos-docker-install.html
1.1 脚本自动安装
# yum-utils
sudo yum install -y yum-utils \
device-mapper-persistent-data \
lvm2
# sudo yum-config-manager \
--add-repo \
http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
sudo yum-config-manager \
--add-repo \
http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
1.2 脚本自动安装
# 移除旧版本
sudo yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine
# list version
yum list docker-ce --showduplicates | sort -r
# install Docker Engin Community
sudo yum install docker-ce docker-ce-cli containerd.io
2 . 启动
# set startup
sudo systemctl enable docker
# start
systemctl start docker
3. 问题
https://blog.csdn.net/qq_28323595/article/details/120202744
4. docker 升级
# 1. 设置存储库
sudo yum install -y yum-utils
sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
# 2. 安装最新版本docker engin 和 containerd.io
sudo yum install docker-ce docker-ce-cli containerd.io