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

docker-machine 0.5.0 env -u fails #2204

Closed
jonaskello opened this issue Nov 6, 2015 · 9 comments
Closed

docker-machine 0.5.0 env -u fails #2204

jonaskello opened this issue Nov 6, 2015 · 9 comments
Assignees
Labels
Milestone

Comments

@jonaskello
Copy link

I get this when I try to unset the selected machine:

$ docker-machine -D env -u
Docker Machine Version: 0.5.0 (04cfa58)
Error trying to get host "": Loading host from store failed: open /home/xxx/.docker/machine/machines/config.json: no such file or directory

Tried to create an empty config.json file at that location but that does not work either. Is there a work around for this problem?

@dgageot dgageot self-assigned this Nov 6, 2015
@dgageot
Copy link
Member

dgageot commented Nov 6, 2015

@jonaskello That's a bug! And I don't think there's a workaround.
Scheduling the fix for 0.5.1

@dgageot
Copy link
Member

dgageot commented Nov 6, 2015

docker-machine env -u fails and it shouldn't
docker-machine env -u machine_name should fail and it isn't

@dgageot dgageot assigned jeanlaurent and unassigned dgageot Nov 6, 2015
@dgageot
Copy link
Member

dgageot commented Nov 6, 2015

@jeanlaurent I let you take a look. There should really be at least an integration test on this one

@Ducatel
Copy link

Ducatel commented Nov 10, 2015

I can also reproduce this issue. I have created a thread about it in the docker forum

jeanlaurent added a commit to jeanlaurent/machine that referenced this issue Nov 12, 2015
Signed-off-by: Jean-Laurent de Morlhon <jeanlaurent@morlhon.net>
@pdalpra
Copy link
Contributor

pdalpra commented Nov 13, 2015

Actually, there is a workaround: I managed to get it work by adding the --shell option.

@nathanleclaire
Copy link
Contributor

The fix has been merged to master so it should be out in the 0.5.1 release next week. Thanks everyone!

@pdalpra
Copy link
Contributor

pdalpra commented Nov 13, 2015

@nathanleclaire sure thing, I mentioned it in case anybody really need to unset env vars in the coming days :P

@jonaskello
Copy link
Author

@pdalpra Could you give the exact command-line you used? I could not use this:

docker-machine --version
docker-machine version 0.5.0 (04cfa58)
$ docker-machine env -u --shell bash
Error trying to get host "": Loading host from store failed: open /Users/JonKel/.docker/machine/machines/config.json: no such file or directory

@pdalpra
Copy link
Contributor

pdalpra commented Nov 13, 2015

@jonaskello I used docker-machine env --shell -u <machine_name>.
Didn't try to unset the currently selected machine though.

skatsuta pushed a commit to skatsuta/machine that referenced this issue Nov 14, 2015
Signed-off-by: Jean-Laurent de Morlhon <jeanlaurent@morlhon.net>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants