You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
devcontainer open does not honor the docker context on the commandline. While, use code . and then open in container it does.
Extension version: 0.191.0
VS Code version: Code 1.59.0 (379476f0e13988d90fab105c5c19e7abc8b1dea8, 2021-08-04T23:14:40.191Z)
OS version: Darwin x64 20.6.0
Restricted Mode: No
System Info
Item
Value
CPUs
Intel(R) Core(TM) i5-8210Y CPU @ 1.60GHz (4 x 1600)
Hi Navneet Karnaani (@navneetkarnani). I have a quick question to ensure I understand your scenario correctly: when setting the docker context, how are you doing that? Via DOCKER_CONTEXT environment variable, or the docker context use CLI command? Thanks!
I think I have the same problem. I set the docker context via the docker.host property in a custom .vscode/settings.json file in the repo (I want the container to launch using Docker on a remote machine). When I open the directory using code . everything works fine once I reopen in the container. However, if I try to open it using devcontainer open, it tries to build the image locally, ignoring .vscode/settings.json.
A few questions:
Is setting docker.host the correct way to do this - it seems to work?
this is pretty painful for switching contexts right now. if you have docker desktop for macOS installed ("desktop-linux") and you try to migrate to orbstack, even setting docker context use ... results in all your docker commands operating on the orbstack context but devcontainers continuing to try to use desktop-linux
Activity
stuartleeks commentedon Aug 16, 2021
Hi Navneet Karnaani (@navneetkarnani). I have a quick question to ensure I understand your scenario correctly: when setting the docker context, how are you doing that? Via
DOCKER_CONTEXTenvironment variable, or thedocker context useCLI command? Thanks!navneetkarnani commentedon Aug 16, 2021
Using 'docker context' which makes it a persistent setting.
stuartleeks commentedon Aug 16, 2021
Thanks 👍
Manouchehri commentedon Aug 27, 2021
This is a bit off-topic, but how do you handle bind mounts with a remote docker context in VS Code Remote?
jflam commentedon Oct 26, 2021
I think I have the same problem. I set the docker context via the
docker.hostproperty in a custom.vscode/settings.jsonfile in the repo (I want the container to launch using Docker on a remote machine). When I open the directory usingcode .everything works fine once I reopen in the container. However, if I try to open it usingdevcontainer open, it tries to build the image locally, ignoring.vscode/settings.json.A few questions:
docker.hostthe correct way to do this - it seems to work?bhack commentedon May 19, 2022
This issue is still reproducible in code-insider. Any update?
raylu commentedon May 14, 2024
this is pretty painful for switching contexts right now. if you have docker desktop for macOS installed ("desktop-linux") and you try to migrate to orbstack, even setting
docker context use ...results in all your docker commands operating on the orbstack context but devcontainers continuing to try to use desktop-linuxanthonylau commentedon Dec 11, 2025
still an issue with devcontainer cli version
0.80.1code .->reopen in containerworks but notdevcontainer openit use default docker context
unix:///var/run/docker.sockwhile it doesn't existsnsbk commentedon Feb 25, 2026
This issue is still happening in version
0.80.2