Machine: Switch to local Docker Host after docker-machine env

Created on 10 Aug 2015  路  4Comments  路  Source: docker/machine

I can switch to the machine dev using

eval "$(docker-machine env dev)"

Docker commands now are issued against dev

How can I switch back to my local Docker host?

Most helpful comment

eval "$(docker-machine env -u)"

All 4 comments

Since the command you issued sets DOCKER_HOST to the the ip of the dev machine, my guess is setting the DOCKET_HOST environment variable to '' with export DOCKER_HOST='' would switch you back to your local host. But idk if there is a docker-machine command for doing this.

Hope that helps!

eval "$(docker-machine env -u)"

@mattjmcnaughton @UserTaken Thanks!

Got following error when I try the command eval "$(docker-machine env -u)"

Error trying to get host "": Loading host from store failed: open /home/ec2-user/.docker/machine/machines/config.json: no such file or directory
Was this page helpful?
0 / 5 - 0 ratings