mac install and deploy docker container

1. Download docker locally. I am using Ali’s mirror accelerator configuration here, so I download it directly on the Aliyun website

Download link: http://mirrors.aliyun.com/docker-toolbox/mac/docker-for-mac/stable/Docker.dmg

Two, installation

1. Open for loading, just move docker to app
Insert picture description here

2. Find the installed docker in the starter, click to open
Insert picture description here

3. The first time you open it, you will be prompted to enter the Mac password. After entering it, click the installation helper.
4. After starting the terminal, you can check the installed Docker version through commands.
docker --version
If the version number is displayed, the installation is successful.

Three, mirror acceleration configuration

In view of the domestic network problems, the subsequent pull of the Docker image is very slow. We may need to configure an accelerator to solve it. We use the domestic mirror address: http://hub-mirror.c.163.com, Alibaba Cloud address

Obtaining the address of
Alibaba Cloud image acceleration: First, open the Alibaba Cloud website: https://cr.console.aliyun.com.
Second, open the mirror center-Mirror Accelerator in the web page. By default, a personal accelerator address will be generated.
Insert picture description here

Application icon–>Perferences–>Select Docker Engine and fill in your address on the right
Insert picture description here

{
    
    
  "experimental": false,
  "registry-mirrors": [
    "https://xxxxx.mirror.aliyuncs.com",
    "http://hub-mirror.c.163.com",
    "https://docker.mirrors.ustc.edu.cn",
    "https://registry.docker-cn.com"
  ],
  "features": {
    
    
    "buildkit": true
  }
}

The value of registry-mirrors needs to be replaced with your own address, and the specifics are as follows: After completing the
Insert picture description here
filling, click the apply&restart button in the lower right corner, and restart it to take effect.

Fourth, check whether Alibaba Cloud and other container image accelerators are effective

Insert picture description here
If you see the information in the red box, the configuration is successful.

Guess you like

Origin blog.csdn.net/lz6363/article/details/109431537