docker安装

[root@localhost ~]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# wget https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/centos/docker-ce.repo

[root@localhost yum.repos.d]# vim docker-ce.repo
:%s@https://download.docker.com/@https://mirrors.tuna.tsinghua.edu.cn/docker-ce/@    #替换为国内源

 

[root@localhost yum.repos.d]# yum repolist

[root@localhost yum.repos.d]# yum -y install docker-ce

 

docker主配置文件
配置文件:/etc/docker/daemon.json

docker镜像加速。

[root@localhost ~]# vi /etc/docker/daemon.json

{

"registry-mirrors": ["https://4ym6pzzt.mirror.aliyuncs.com"]

}

[root@localhost etc]# systemctl start docker.service

[root@localhost etc]# systemctl status docker.service |grep "(running"
Active: active (running) since 一 2019-10-28 16:25:18 CST; 1min 53s ago

 

posted @ 2019-10-28 16:28  星火撩原  阅读(120)  评论(0编辑  收藏  举报