Docker在Linux上下载与安装配置
Docker在Linux上下载与安装配置
官方文档: https://docs.docker.com/install/linux/docker-ce/centos/#set-up-the-repository
1、删除旧版本的docker,防止有残留
sudo yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine
2、安装可能用到的依赖
yum install -y yum-utils device-mapper-persistent-data lvm2
3、添加位置
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
4、查询可以装什么docker版本
yum list docker-ce --showduplicates | sort -r
5、安装指定版本
yum -y install docker-ce-18.06.1.ce-3.el7
6、开启docker服务
systemctl start docker
7、设置开机自启动
systemctl enable docker
8、查看版本
docker version
9、配置国内镜像
vi /etc/docker/daemon.json 然后配置一下内容: { "registry-mirrors": [ "https://kfwkfulq.mirror.aliyuncs.com", "https://2lqq34jg.mirror.aliyuncs.com", "https://pee6w651.mirror.aliyuncs.com", "https://registry.docker-cn.com", "http://hub-mirror.c.163.com" ], "dns": ["8.8.8.8","8.8.4.4"] }
10、重启docker
systemctl restart docker
相关推荐
王道革 2020-11-25
bwyyziq 2020-11-22
pigsmall 2020-11-19
changecan 2020-11-19
helloWorldAndYou 2020-11-16
nginxs 2020-11-14
红石丶 2020-11-13
WanKaShing 2020-11-12
yangkang 2020-11-12
滴水穿石点石成金 2020-11-12
张荣珍 2020-11-12
wuxunanjing 2020-11-11
魅惑青花瓷 2020-11-11
lihongtai 2020-11-09
yangkang 2020-11-09
worldsnow 2020-11-06
MichaelJScofield 2020-11-06
TaoTaoFu 2020-11-06