docker changes the domestic download source

1. Type in the terminal:

  • First log in to the Alibaba Cloud Developer Service Platform
https://promotion.aliyun.com/ntms/act/kubernetes.html#industry
  • Then log in to your account
  • Click mirror search
  • Then follow the method on the picture to configure it.
    Insert picture description here

Method Two

curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http:xxxx,跟上自己上面的链接进行快速设置

After that, there will be an additional json file. , There is an additional docker image download source configuration
Insert picture description here

  • This json file is under the **/etc/docker/** folder, the name is daemon.json , and the content is the sentence in the picture above
  • Then restart the service to take effect
systemctl restart docker 
  • It should be noted that the modification of this operation is only to download from the shared warehouse

Add download source of private warehouse

As with the above method, you only need to add the source address of a private warehouse in the dictionary.

Guess you like

Origin blog.csdn.net/pythonstrat/article/details/108451629