-
Notifications
You must be signed in to change notification settings - Fork 516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't connect to Docker after opening a folder/workspace (Docker Toolbox) #964
Comments
Here're more experiments which might lead to easier problem locating: The extension cannot connect to docker after VS Code reloaded. So there is nothing to do with if there's a folder/workspace loaded, as long as VS Code doesn't reload after startup. I tried to run |
@wizcas there's a lot of discussion in VS Code about how and when process environment variables should be inherited. I'm guessing VS Code is properly inheriting DOCKER_HOST (or some other env var) when you open it the first time, but not after reloading the window. Here's one example issue: microsoft/vscode#15452 Suffice it to say I'm not entirely caught up on all of their design choices/reasoning in this area and you're welcome to poke around in their repo. In terms of the "docker.host" setting - that is something we can control directly from this extension. We're aware there's issues here and we want to improve this. Take a look at this for an example: #216 (or any issue labeled with "DOCKER_HOST"). I don't have an easy workaround for you at the moment, but we're looking into it |
@EricJizbaMSFT Thank you for you reply. Good to know the problems are spotted. Hopefully there will be a fix in not far future :) |
The extension on my machine works fine on a clean startup, i.e. in an empty workspace. It looks as below:
But once I open a folder or a workspace and the window reloaded, the connection won't establish anymore with error:
I have the
DOCKER_HOST
environment variable in my system setting astcp://192.168.99.100:2376
, and I tried to setdocker.host
to bothtcp://192.168.99.100:2376
and192.168.99.100:2376
(which was mentioned in another issue saying removing the protocol makes the extension works). None of them works.Another weird thing is that, the
start.sh
script provided by Docker Toolbox can't work in VSCode terminal after loading folder/workspace as well, which works fine on startup. It shows an error that 'Docker Machine is not installed, which seems being caused byDOCKER_TOOLBOX_INSTALL_PATH
not correctly read.Is there any log or more information I can provide to figure out how this problem happens?
The text was updated successfully, but these errors were encountered: