Search code examples
macosdockerboot2dockerdocker-machine

How do I switch between active docker-machines on OSX?


Within MacOS, I have created 2 docker machines, say, dev1 and dev2. In one terminal running $docker-machine active shows dev1 as an active docker-machine and in the other, dev2. Now I want to switch to dev2 in the 1st terminal (without stopping/removing etc. dev1) so that I'll have dev2 in both.

How do I do this? Thanks!


Solution

  • run command in your terminal eval $(docker-machine env [machine-name]) Run docker-machine ls to get available machines list