docker机器活动 | docker-machine active
码头机活动
查看哪台机器处于“活动状态”(如果DOCKER_HOST
环境变量指向该机器,则认为机器处于活动状态)。
$ docker-machine ls
NAME ACTIVE DRIVER STATE URL
dev - virtualbox Running tcp://192.168.99.103:2376
staging * digitalocean Running tcp://203.0.113.81:2376
$ echo $DOCKER_HOST
tcp://203.0.113.81:2376
$ docker-machine active
staging