2015-07-07 09:53:04 -07:00
|
|
|
<!--[metadata]>
|
|
|
|
|
+++
|
|
|
|
|
title = "active"
|
|
|
|
|
description = "Identify active machines"
|
|
|
|
|
keywords = ["machine, active, subcommand"]
|
|
|
|
|
[menu.main]
|
|
|
|
|
parent="smn_machine_subcmds"
|
|
|
|
|
+++
|
|
|
|
|
<![end-metadata]-->
|
|
|
|
|
|
|
|
|
|
# active
|
|
|
|
|
|
|
|
|
|
See which machine is "active" (a machine is considered active if the
|
|
|
|
|
`DOCKER_HOST` environment variable points to it).
|
|
|
|
|
|
2015-11-27 10:16:42 +01:00
|
|
|
$ docker-machine ls
|
|
|
|
|
NAME ACTIVE DRIVER STATE URL
|
|
|
|
|
dev - virtualbox Running tcp://192.168.99.103:2376
|
2016-01-20 03:31:14 +01:00
|
|
|
staging * digitalocean Running tcp://203.0.113.81:2376
|
2015-11-27 10:16:42 +01:00
|
|
|
$ echo $DOCKER_HOST
|
2016-01-20 03:31:14 +01:00
|
|
|
tcp://203.0.113.81:2376
|
2015-11-27 10:16:42 +01:00
|
|
|
$ docker-machine active
|
|
|
|
|
staging
|