1.docker安装包安装很顺利, yum安装 sudo systemctl daemon-reload sudo systemctl start docker 2.公司的代理服务器坑, 需要设置docker的访问代理 mkdir -p /etc/systemd/system/docker.service.d vim /etc/systemd/system/docker.service.d/http-proxy.conf ########################################################################################## [Service] Environment="HTTP_PROXY=http://xxxx:80" "HTTPS_PROXY=http://xxxxx:80" "NO_PROXY=localhost,127.0.0.1,registry-1.docker.io" ########################################################################################## 3.国内镜像加速 vim /etc/docker/daemon.json ########################################################################################## { "registry-mirrors": [ "https://1nj0zren.mirror.aliyuncs.com", "https://docker.mirrors.ustc.edu.cn", "http://f1361db2.m.daocloud.io", "https://registry.docker-cn.com" ] } ########################################################################################## 4.reload & restart sudo systemctl daemon-reload sudo systemctl restart docker 设置完这些, 基本上就可以docker pull hello-world, docker search hello-world, docker info 5.一般的docker pull 不用login就可以了.在阿里云上注册帐号,于是 有了login sudo docker login --username=xxxxx@XXXXX registry.cn-hangzhou.aliyuncs.com
docker hub
https://hub.docker.com/
国内加速镜像
https://www.jianshu.com/p/5a911f20d93e
https://www.cnblogs.com/wushuaishuai/p/9984228.html#_label0