ubuntu16.04 配置阿里云docker镜像加速器

一、配置阿里云docker镜像加速器

#配置加速器地址

root@nulige:~# vi /etc/docker/daemon.json

{
"registry-mirrors": ["https://alzgoonw.mirror.aliyuncs.com"]
}

 

#重启服务

root@nulige:~# systemctl daemon-reload
root@nulige:~# systemctl restart docker
root@nulige:~# systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since 六 2018-07-14 15:57:37 CST; 5s ago
Docs: https://docs.docker.com
Main PID: 20924 (dockerd)
Tasks: 24
Memory: 17.5M
CPU: 335ms
CGroup: /system.slice/docker.service
├─20924 /usr/bin/dockerd -H fd://
└─20931 containerd -l unix:///var/run/docker/libcontainerd/docker-containerd.sock

7月 14 15:57:36 nulige dockerd[20924]: time="2018-07-14T15:57:36.563943482+08:00" level=info
7月 14 15:57:36 nulige dockerd[20924]: time="2018-07-14T15:57:36.806216247+08:00" level=info
7月 14 15:57:36 nulige dockerd[20924]: time="2018-07-14T15:57:36.939167334+08:00" level=info
7月 14 15:57:36 nulige dockerd[20924]: time="2018-07-14T15:57:36.942417843+08:00" level=warni
7月 14 15:57:36 nulige dockerd[20924]: time="2018-07-14T15:57:36.993952096+08:00" level=warni
7月 14 15:57:36 nulige dockerd[20924]: time="2018-07-14T15:57:36.995672598+08:00" level=warni
7月 14 15:57:36 nulige dockerd[20924]: time="2018-07-14T15:57:36.996020601+08:00" level=info
7月 14 15:57:36 nulige dockerd[20924]: time="2018-07-14T15:57:36.996082156+08:00" level=info
7月 14 15:57:37 nulige dockerd[20924]: time="2018-07-14T15:57:37.012728149+08:00" level=info
7月 14 15:57:37 nulige systemd[1]: Started Docker Application Container Engine.

 

#获取centos镜像

root@nulige:~# docker pull centos
Using default tag: latest
latest: Pulling from library/centos
7dc0dca2b151: Pull complete
Digest: sha256:b67d21dfe609ddacf404589e04631d90a342921e81c40aeaf3391f6717fa5322
Status: Downloaded newer image for centos:latest

 

#查看镜像

root@nulige:~# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
centos latest 49f7960eb7e4 5 weeks ago 200 MB

posted @ 2018-07-14 16:03  努力哥  阅读(4390)  评论(0编辑  收藏  举报