Install Docker on Mac OS X

Source: Internet
Author: User
Tags docker ps docker hub docker run



Small white to cottage an official website document.



Docker cannot run directly on OS X, it needs to install the VirtualBox and Boot2docker first. Boot2docker will help us launch the VMS, launch Docker, and provide some administrative commands by itself.
Boot2docker is also very lightweight, completely in memory to start a VM, only the size of 24M, can be launched in a few seconds.


installation process


1) Download the VIRTUALVM-XXX-XXX.DMG and install.
2) Use Brew to install Boot2docker and Docker


 
brew install boot2docker
brew install docker


3) Create a new VM, this step only needs to be performed on your machine once


boot2docker init


4) Start the VM


 
boot2docker start


5) write the specific Docker related environment information in the VM to the Environment path


Boot2docker shellinit ා then execute the export in it once
##Or, directly
eval "$(boot2docker shellinit)" 


6) At this time Docker and start up, can knock command check running status


 
docker version
boot2docker status


7) Automatically download the image and run the application in Docker


#Hello world is an existing image in the docker hub, which will be downloaded and executed
docker run hello-world
#You can also try nginx provided by the official website. The first time you run, you will download the image and spend some time
docker run -d -P --name web nginx 


8) Managing applications in Docker


Docker PS view running apps
Docker logs web view the logs of the app with the name of Web
Docker stop web stop app
docker rm web 


9) Stop Boot2docker


 
boot2docker stop
boot2docker poweroff
Add


In the Docker hub, you can see the image of a downloadable deployment already in repo. First register a user on the site and then


docker login


Landing.



Pass


docker search spark


You can search for remote mirrors locally. and download them.


docker pull img-name


The Docker hub is to IMG, which is the equivalent of GitHub to project.



Reference from official website http://docs.docker.com/installation/mac/
and http://docs.docker.com/userguide/
There are more explanations for mirrors, warehouses, Docker commands



Complete the full text:)



Install Docker on Mac OS X


Related Article

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.