Configure docker domestic image warehouse address on MacOS

background

The Internet speed of docker's official image warehouse is poor. We need to set up a domestic image service.
My MacOS docker version is as follows
Insert image description here

Set the docker domestic image warehouse address

Insert image description here

  1. Click Settings
  2. Click on Docker Engine
  3. Modify the configuration file and addregistry-mirrors
{
    
    
  "builder": {
    
    
    "gc": {
    
    
      "defaultKeepStorage": "20GB",
      "enabled": true
    }
  },
  "data-root": "/var/lib/docker",
  "experimental": false,
  "features": {
    
    
    "buildkit": true
  },
  "registry-mirrors": [
    "https://docker.mirrors.ustc.edu.cn/",
    "https://hub-mirror.c.163.com/",
    "https://registry.docker-cn.com/"
  ]
}

Other references

Refer to Alibaba Cloud's mirror acceleration document: https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors
The above link requires logging in to the Alibaba Cloud account to obtain the mirror accelerator address for the exclusive user.
Insert image description here
This address can also be configured toregistry-mirrors

Guess you like

Origin blog.csdn.net/u011308433/article/details/132058397