Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

Switch to local Docker Host after docker-machine env #1659

Closed
AlexZeitler opened this issue Aug 9, 2015 · 4 comments
Closed

Switch to local Docker Host after docker-machine env #1659

AlexZeitler opened this issue Aug 9, 2015 · 4 comments

Comments

@AlexZeitler
Copy link

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?

@mattjmcnaughton
Copy link
Contributor

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!

@ghost
Copy link

ghost commented Aug 10, 2015

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

@AlexZeitler
Copy link
Author

@mattjmcnaughton @usertaken Thanks!

@harishanchu
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants