Docker Community Forums

Share and learn in the Docker community.

Docker-machine confused by multiple machines


(Bigpapoo) #1

Hi, docker-machine is reporting bad info, mixing between the 2 Docker machines I configured, one as a local Virtualbox machine and another one at my Cloud Datacenter provider (Gandi).

Note : IP 92.99.99.99 is not the real IP

$ docker-machine ls
NAME            ACTIVE   DRIVER       STATE     URL                         SWARM   DOCKER    ERRORS
default         -        virtualbox   Running   tcp://192.168.99.100:2376           v1.12.3
gandi-docker2   *        gandi        Running   tcp://92.99.99.99:2376            v1.12.3

$ eval $(docker-machine env default)
$ docker-machine url
tcp://192.168.99.100:2376

$ eval $(docker-machine env gandi-docker2)
$ docker-machine url
tcp://192.168.99.100:2376 (wrong !)

When SSH-ing, I end up on the wrong machine too (the local one in place of my remote machine).
Btw, the “active” is well changed each time, I checked it.

$ docker-machine --version
docker-machine version 0.8.1, build 41b3b25

Any idea? Thanks.


(Bigpapoo) #2

Replying to myself. Ok, I think I got it wrong, sorry. Switching the machine is useful for docker-compose then, but for docker-machine [url | status | …] I must just supply a machine name as third param, else it will only use the “default” one…