System Requirements
Docker for Mac requires a minimum system of MacOS 10.10.3 Yosemite, or Mac models after 2010, to be exact, with Intel MMU virtualization, with a minimum of 4GB memory.
If the system does not meet the requirements, you can install Docker Toolbox.
Installation using Homebrew installation
Homebrew's Cask already supports Docker for MAC, so it's easy to install with Homebrew Cask:
Brew Cask Install Docker
Manually download the installation
If you need to download it manually, you can download it via this link: https://download.docker.com/mac/stable/Docker.dmg
Like other MacOS software, the installation is very simple, double-click the downloaded .dmg
file, and then drag the whale icon named Moby to the Application
folder (which may ask for the system password).
Run
Find the Docker icon from the app and click Run.
After running, you'll see a whale icon in the top right-hand menu bar, which indicates the status of Docker.
The first time you click on the icon, you may see this installation successful interface, click "Got It!" can close this window.
The Action menu will pop up every time you click on the whale icon.
To use Docker at home, you need to configure the accelerator, click in the menu, Preferences...
then view the Advanced
label, and in the Registry mirrors
section you can click the plus sign to add an accelerator address.
After you start the terminal, you can check the installed Docker version by command
1 $ docker--version2 Docker version 1.12.3, build 6b644ec3 $ Docker-compose--version4 docker-compose version 1.8.1, build 878cff15 $ Docker-machine--version6 docker-machine version 0.8.2, build e18a919
If docker version
, docker info
all is normal, can run an Nginx server:
1 $ docker run-d-P 80:80--name webserver nginx
After the service runs, you can access http://localhost, and if you see "Welcome to Nginx!", the Docker for MAC installation is successful.
To stop the Nginx server and remove the following command:
1 $ docker Stop webserver 2 $ docker RM webserver
Reference documents
- Docker Official MacOS Installation Documentation
MacOS Install Docker