2016-12-02 71 views
0

当我在菜单栏中的Mac图标翻一番泊坞窗点击,我看到一个图标显示:Docker for Mac状态“Running”是什么意思?

enter image description here

我有2个问题:

1)我怎样才能得到相同的效果通过命令行? - >截至今日,在命令行只是给我的命令泊坞窗

Mac:bin romain$ docker 
Usage: docker [OPTIONS] COMMAND [arg...] 
     docker [ --help | -v | --version ] 

A self-sufficient runtime for containers. 

Options: 

    --config=~/.docker    Location of client config files 
    -D, --debug      Enable debug mode 
    -H, --host=[]     Daemon socket(s) to connect to 
    -h, --help      Print usage 
    -l, --log-level=info   Set the logging level 
    --tls       Use TLS; implied by --tlsverify 
    --tlscacert=~/.docker/ca.pem Trust certs signed only by this CA 
    --tlscert=~/.docker/cert.pem Path to TLS certificate file 
    --tlskey=~/.docker/key.pem  Path to TLS key file 
    --tlsverify      Use TLS and verify the remote 
    -v, --version     Print version information and quit 

Commands: 
    attach Attach to a running container 
    build  Build an image from a Dockerfile 
    commit Create a new image from a container's changes 
    cp  Copy files/folders between a container and the local filesystem 
    create Create a new container 
    diff  Inspect changes on a container's filesystem 
    events Get real time events from the server 
    exec  Run a command in a running container 

2)他们是什么意思的“泊坞窗运行” - 我明白的容器可以是,但码头工人?

+0

尝试http://apple.stackexchange.com。 – lhf

+0

类似的问题在这里:http://superuser.com/questions/1105087/starting-docker-for-mac-from-the-command-line – nwinkler

回答

0

您可以在命令行上使用open -a Docker

对于泊坞窗“以运行”是指泊坞窗守护程序能够接受命令,如docker ps,做你所期望的一样,通过你的命令,以适当的容器,或返回从容器或守护的东西。

1

当Docker for Mac表示它正在运行时,这意味着虚拟Docker环境正在您的计算机上运行。 Docker for Mac使用xhyve在Mac上运行小型Linux VM。

Docker本身作为该VM内部的守护进程运行。 Docker for Mac菜单栏图标的状态显示该Linux VM是否已启动。

您可以在终端中运行的docker命令允许您与该Linux VM中运行的Docker守护进程进行交互。您可以使用docker命令来构建映像或创建/启动/停止容器。