简体   繁体   中英

Why docker containers can run, despite of docker-machine is not running?

Apparently, this is a silly question, though, i hope someone can help me.

I was thinking docker containers can run, because docker-machine is running on my MacOS X. Like on this situation:

 > docker-machine ls
NAME      ACTIVE   DRIVER       STATE     URL                         SWARM   DOCKER    ERRORS
default   -        virtualbox   Running   tcp://192.168.99.100:2376           v1.12.2 

 > docker ps
CONTAINER ID        IMAGE               COMMAND              CREATED             STATUS              PORTS                NAMES
abb8beb2a0fd        httpd:2.4           "httpd-foreground"   48 minutes ago      Up 47 minutes       0.0.0.0:80->80/tcp   romantic_kare

But container can run, although in this situation.

 > docker-machine ls
NAME      ACTIVE   DRIVER       STATE     URL   SWARM   DOCKER    ERRORS
default   -        virtualbox   Stopped                 Unknown   

 > docker ps
CONTAINER ID        IMAGE               COMMAND              CREATED             STATUS              PORTS                NAMES
abb8beb2a0fd        httpd:2.4           "httpd-foreground"   48 minutes ago      Up 47 minutes       0.0.0.0:80->80/tcp   romantic_kare

Are there are no relationships between them?

Reference: https://docs.docker.com/machine/overview/


I installed Docker for Mac .

 > docker --version
Docker version 1.12.1, build 6f9534c

This post is duplicated with Default docker machine on Mac .

Docker 1.12 and onward no longer uses docker-machine to run containers. Instead it uses a native docker engine for mac/windows.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM