1. 程式人生 > >ubuntu16.04 配置阿里雲docker映象加速器

ubuntu16.04 配置阿里雲docker映象加速器

一、配置阿里雲docker映象加速器

#配置加速器地址

[email protected]:~# vi /etc/docker/daemon.json


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

#重啟服務

[email protected]:~# systemctl daemon-reload
[email protected]:~# systemctl restart docker
[email protected]:~# 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映象

[email protected]:~# 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

#檢視映象

[email protected]

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