2016年10月27日星期四

Docker_002:MAC 下安装 Docker

环境:MAC OS X 10.12.1 + Docker 1.12

1. 下载
最新版下载地址:http://www.docker.com/products/docker#/mac

以前版下载地址:https://download.docker.com/mac/{{ beta | stable}}/{{ version }}.{{ build number }}/Docker.dmg
举例说明:
https://download.docker.com/mac/stable/1.12.6.14937/Docker.dmg
https://download.docker.com/mac/stable/1.13.1.15353/Docker.dmg

2. 安装
双击 Docker.dmg

3. 测试
$ docker --version
Docker version 1.12.1, build 6f9534c

$ docker-compose --version
docker-compose version 1.8.0, build f3628c7

$ docker-machine --version
docker-machine version 0.8.1, build 41b3b25

$ docker info
Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 0
Server Version: 1.12.1
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 0
 Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: null host bridge overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: seccomp
Kernel Version: 4.4.20-moby
Operating System: Alpine Linux v3.4
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 1.952 GiB
Name: moby
ID: 6KEA:LU3F:2SVP:FLWR:KXCH:25A7:KHTH:ZHJF:NKNU:EVYK:PUG6:GVIN
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: 16
 Goroutines: 27
 System Time: 2016-10-27T02:42:17.643481669Z
 EventsListeners: 1
No Proxy: localhost、*.local、169.254/16
Registry: https://index.docker.io/v1/
Insecure Registries:
 127.0.0.0/8

4. 运行 Hello World
$ docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
c04b14da8d14: Pull complete
Digest: sha256:0256e8a36e2070f7bf2d0b0763dbabdd67798512411de4cdcf9431a1feb60fd9
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker Hub account:
 https://hub.docker.com

For more examples and ideas, visit:
 https://docs.docker.com/engine/userguide/

5. Docker 镜像保存在哪里?
~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2

没有评论: