Closed edmorley closed 9 years ago
If we do make this change, we'll also need to adjust start.sh in the Windows installer, since it tries to compensate for this already (cc @SvenDowideit), so we'd double up: https://github.com/boot2docker/windows-installer/blob/7bf811d592bddf0b71c534f652fc935f6b3f6914/start.sh#L30-L31
Ah, it seems like as of boot2docker/boot2docker#786 the new advice is to use:
eval "$(boot2docker shellinit)"
...instead, which fixes this and other issues.
Unfortunately the old form is used in a fair number of Stack overflow/how-to guides etc, plus I read the boot2docker readme before they made that change.
To make it clearer, perhaps we could advise to use eval "$(boot2docker shellinit)"
in the shellinit text (to part that goes to stderr, like the "Writing foo" messages)?
(Hi again :))
Can you add some more information about the shell / environment you're running this in? (PowerShell, CMD.exe etc.). I know there have been quite some differences in behavior, depending on that.
I've updated a few more instances of the docs for related projects that were still recommending the old way: docker/docker-py#633 docker/compose#1533
In #356, single quotes were added around the value assigned to DOCKER_CERT_PATH on Windows.
This results in output like:
Copying and pasting the export lines above and running them by hand (or adding to .profile) works fine.
However when using
$(boot2docker shellinit)
the quotes actually end up in the value assigned to DOCKER_CERT_PATH, which causes an error when trying to use Docker. eg:Which leaves a bit of a dilemma: If shellinit doesn't output the quotes, then the manual method breaks, if it does output the quotes, then the
$(boot2docker shellinit)
method breaks.It seems the only way to get a value that works for both, is to remove the quotes, and replace all backslashes with double backslashes, eg: