DOCKER-MAC Installation

Source: Internet
Author: User
Tags configuration settings cloud hosting docker for mac docker ps docker hub docker run docker toolbox

1. Download the installation package
2. Installation
3. Run, allow Docker to get system privileges, it needs to link the Mac Nic to the Docker app.
4. Verify Open Terminal
Docker version
Fengzhendemacbook-pro:0527eurekaserver fengzhen$ Docker version
Client:
Version:18.03.1-ce
API version:1.37
Go version:go1.9.5
Git Commit:9ee9f40
Built:thu APR 26 07:13:02 2018
Os/arch:darwin/amd64
Experimental:false
Orchestrator:swarm

Server:
Engine:
Version:18.03.1-ce
API version:1.37 (Minimum version 1.12)
Go version:go1.9.5
Git Commit:9ee9f40
Built:thu APR 26 07:22:38 2018
Os/arch:linux/amd64
Experimental:true
The above information indicates the installation and startup success
Start an nginx container below to check that the image is properly retrieved and run
Docker run-d-P 80:80--name webserver nginx
Fengzhendemacbook-pro:0527eurekaserver fengzhen$ Docker run-d-P 80:80--name webserver nginx
Unable to find image ' nginx:latest ' locally
Latest:pulling from Library/nginx
F2aa67a397c4:pull Complete
1cd0975d4f45:pull Complete
72fd2d3be09a:pull Complete
Digest:sha256:3e2ffcf0edca2a4e9b24ca442d227baea7b7f0e33ad654ef1eb806fbd9bedcf0
status:downloaded newer image for Nginx:latest
9accde73018bcd5df42e08263c4d8de8a5a795fc435e64901a8c17acf4c2c1e8
Then use the Docker PS Directive to view the currently running container
Fengzhendemacbook-pro:0527eurekaserver fengzhen$ Docker PS
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9accde73018b nginx "nginx-g ' daemon of ..." 8 minutes ago up 8 minutes 0.0.0.0:80->80/tcp webserver
It can be seen that the Nginx container has been started in 0.0.0.0:80 and mapped to port 80, which opens the browser to access this address

5. Common configuration settings. First, click the Docker icon in the System status bar and the Action menu will appear.

Click Preferences, go to the standard configuration page, we can set whether to start and update automatically, set the Backup tool whether time machine backs up VMS, also can configure the number of CPUs used by Docker, memory capacity,


To better use the Docker Hub (the official cloud hosting service), we can use the registry mirror site for acceleration, and we can configure the HTTP proxy server,

Click to enter the File Sharing tab, where you can configure the local directory attached to the container. Click + to continue adding a local directory,

6. Installing Docker on Mac OS X operating system, in addition to the native way of Docker for Mac, can also be used with the Official Docker Toolbox tool
Download the corresponding version of Toolbox, currently supported by Docker for Mac OS x version 10.6 +
https://docs.docker.com/toolbox/

Double-click Run installation package. This process installs a VirtualBox virtual machine with built-in management tools such as Docker Engine, Compose, Machine, and kitematic. After successful installation, locate Boot2docker and run

To initialize the Boot2docker
Boot2docker Init
Boot2docker start
${boot2docker Shellinit}
You will see the virtual machine start running in the command-line window. When the virtual machine is initialized, you can use the
Boot2docker stop and Boot2docker start to control it.

DOCKER-MAC Installation

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.