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