docker安装

安装docker

 

》》下载:

https://github.com/boot2docker/osx-installer/releases/tag/v1.4.1

 

baidu云下载:http://pan.baidu.com/s/1o6Fm5pK

 

 


docker安装_第1张图片

 


docker安装_第2张图片
 
 

 》》点击安装的boot2docker:


docker安装_第3张图片
 

 

bash-3.2$ /usr/local/bin/boot2docker init
Generating public/private rsa key pair.
Your identification has been saved in /Users/hyy044101331/.ssh/id_boot2docker.
Your public key has been saved in /Users/hyy044101331/.ssh/id_boot2docker.pub.
The key fingerprint is:
86:11:88:4d:e1:87:bf:a8:4d:32:52:4a:bc:a7:11:c3 [email protected]
The key's randomart image is:
+--[ RSA 2048]----+
|   +oo.          |
|  ..o. .         |
|    o o          |
|o    o o         |
| E.   o S        |
|.o+  . o         |
|ooo.o .          |
| .+*             |
| .. .            |
+-----------------+
 
bash-3.2$ /usr/local/bin/boot2docker up
Waiting for VM and Docker daemon to start...
.......................oooooooooooooooooo
Started.
Writing /Users/hyy044101331/.boot2docker/certs/boot2docker-vm/ca.pem
Writing /Users/hyy044101331/.boot2docker/certs/boot2docker-vm/cert.pem
Writing /Users/hyy044101331/.boot2docker/certs/boot2docker-vm/key.pem

To connect the Docker client to the Docker daemon, please set:
    export DOCKER_HOST=tcp://192.168.59.103:2376
    export DOCKER_CERT_PATH=/Users/hyy044101331/.boot2docker/certs/boot2docker-vm
    export DOCKER_TLS_VERIFY=1

 
bash-3.2$ $(/usr/local/bin/boot2docker shellinit)
Writing /Users/hyy044101331/.boot2docker/certs/boot2docker-vm/ca.pem
Writing /Users/hyy044101331/.boot2docker/certs/boot2docker-vm/cert.pem
Writing /Users/hyy044101331/.boot2docker/certs/boot2docker-vm/key.pem
 
 
bash-3.2$ docker version
Client version: 1.4.1
Client API version: 1.16
Go version (client): go1.3.3
Git commit (client): 5bc2ff8
OS/Arch (client): darwin/amd64
Server version: 1.4.1
Server API version: 1.16
Go version (server): go1.3.3
Git commit (server): 5bc2ff8
 
 
 
 

》》设置docker的主机地址:

 
mengka-2:~ hyy044101331$ vi ~/.bash_profile 
export DOCKER_CERT_PATH= /Users/hyy044101331/.boot2docker/certs/boot2docker-vm
export DOCKER_TLS_VERIFY= 1
export DOCKER_HOST= tcp:// 192 . 168 . 59 . 103 : 2376
 
 
 
 
》》启动:
boot2docker start
boot2docker stop
 
 
mengka-2:~ hyy044101331$ boot2docker start
Waiting for VM and Docker daemon to start...
.o
Started.
Writing /Users/hyy044101331/.boot2docker/certs/boot2docker-vm/ca.pem
Writing /Users/hyy044101331/.boot2docker/certs/boot2docker-vm/cert.pem
Writing /Users/hyy044101331/.boot2docker/certs/boot2docker-vm/key.pem

 

 Your environment variables are already set correctly.

 

 

 

 

你可能感兴趣的:(docker)