Install Docker on Mac

来源:互联网 发布:知耻阅读答案 编辑:程序博客网 时间:2024/05/22 09:02


root% brew install docker

root% brew install docker-compose 

root% brew install docker-machine


root% docker-machine create --driver virtualbox default

Host already exists: "default"

root% docker-machine env default                       

export DOCKER_TLS_VERIFY="1"

export DOCKER_HOST="tcp://192.168.99.100:2376"

export DOCKER_CERT_PATH="/Users/root1/.docker/machine/machines/default"

export DOCKER_MACHINE_NAME="default"

# Run this command to configure your shell: 

# eval $(docker-machine env default)

root% eval $(docker-machine env default)               

root% docker run hello-world

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 ID:

 https://cloud.docker.com/


For more examples and ideas, visit:

 https://docs.docker.com/engine/userguide/


原创粉丝点击