Docker installation under Mac

This article describes how to install Docker environment under Mac

1. Install docker

There are two installation methods:

  • homebrew installation

  • dmg file manual installation

1.1 Install with Homebrew

1) Homebrew installs docker


#About brew installation is not in the scope of introduction brew cask install docker

 

2) Open the launch pad and click the Docker icon

 

3) Click to open the application

 

4) Click OK to verify

 

5) Enter the account password and click to install the helper

 

6) Click Install Update and wait for completion

 

7) After the installation is complete, there will be a little whale icon in the upper right corner

1.2 Manual download and installation

1) wget download the stable version of Docker (or open the link in the browser)

wget https://download.docker.com/mac/stable/Docker.dmg

2) Open the .dmg file

Double-click the Docker.dmg file, and then drag the Docker icon to Applications.

 

3) Refer to the homebrew installation above for the next steps

 

2. Configure Docker

2.1 View docker version

Open the terminal and execute as follows:

docker --version

2.2 Verify that docker is working

Open the terminal and execute as follows:

docker run hello-world

The operation is successful, let's configure the Docker environment below

 

2.3 Configure DockerHub account

1) Click the Docker whale icon and select Sign in/Create Docker ID

 

2) Enter DockerID and Password in the pop-up interface, if not, please register an account on https://hub.docker.com (free)

 

3) Hub.docker.com account registration page

 

4) After logging in, it displays logged in (you can log out)

 

2.4 Configure docker domestic source

1) Click the Docker whale icon, select preference, and paste the following content:

{"experimental": false,"debug": true,"registry-mirrors": ["https://r9xxm8z8.mirror.aliyuncs.com","https://registry.docker-cn.com"]}

 

2)重启docker,点击Restart

 

3) 打开终端,输入docker info,查看mirrors列表

 

到这里,Docker在Mac下的安装已经完成!

博主:测试生财

座右铭:专注测试与自动化,致力提高研发效能;通过测试精进完成原始积累,通过读书理财奔向财务自由。

csdn:https://blog.csdn.net/ccgshigao

博客园:https://www.cnblogs.com/qa-freeroad/

51cto:https://blog.51cto.com/14900374


Guess you like

Origin blog.51cto.com/14900374/2542424