Docker List docker machines


Example

Listing docker-machines will return the state, address and version of Docker of each docker machines.

 docker-machine ls

Will print something like:

NAME             ACTIVE   DRIVER    STATE     URL                          SWARM   DOCKER    ERRORS
docker-machine-1 -        ovh       Running   tcp://1.2.3.4:2376                   v1.11.2   
docker-machine-2 -        generic   Running   tcp://1.2.3.5:2376                   v1.11.2   

To list running machines:

docker-machine ls --filter state=running

To list error machines:

docker-machine ls --filter state=

To list machines who's name starts with 'side-project-', use Golang filter:

docker-machine ls --filter name="^side-project-"

To get only the list of machine's URLs:

docker-machine ls --format '{{ .URL }}'

See https://docs.docker.com/machine/reference/ls/ for the full command reference.