Ubuntu配置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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM