标签:repo col persist 加速器 网址 download world lvm move
1、首先卸载旧版:
yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-selinux docker-engine-selinux docker-engine
2、安装依赖包:
yum install -y yum-utils device-mapper-persistent-data lvm2
3、设置存储库:
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
4、启用测试库(可选):
yum-config-manager --enable docker-ce-edge yum-config-manager --enable docker-ce-test
5、安装:
yum install docker-ce
6、启动:
systemctl start docker
7、配置镜像加速器(可选):
打开网址:https://cr.console.aliyun.com/#/accelerator
注册、登录、设置密码
然后在页面上可以看到加速器地址,类似于:https://123abc.mirror.aliyuncs.com
运行命令(注意修改地址):
mkdir -p /etc/docker tee /etc/docker/daemon.json <<-‘EOF‘ { "registry-mirrors": ["https://123abc.mirror.aliyuncs.com"] } EOF systemctl daemon-reload systemctl restart docker
8、测试:
docker run hello-world
标签:repo col persist 加速器 网址 download world lvm move
原文地址:https://www.cnblogs.com/hackyo/p/9280042.html