MacOS Install Docker

Source: Internet
Author: User
Tags nginx server docker for mac homebrew cask docker run docker toolbox brew cask

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.