vscode-remote-release
vscode-remote-release copied to clipboard
devcontainer cli ignores docker context
Issue Type: Bug
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) |
| GPU Status | 2d_canvas: enabled gpu_compositing: enabled metal: disabled_off multiple_raster_threads: enabled_on oop_rasterization: enabled opengl: enabled_on rasterization: enabled skia_renderer: disabled_off_ok video_decode: enabled webgl: enabled webgl2: enabled |
| Load (avg) | 50, 32, 18 |
| Memory (System) | 16.00GB (1.48GB free) |
| Process Argv | . |
| Screen Reader | no |
| VM | 0% |
Hi @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!
Using 'docker context' which makes it a persistent setting.
Thanks 👍
This is a bit off-topic, but how do you handle bind mounts with a remote docker context in VS Code Remote?
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.hostthe correct way to do this - it seems to work? - Is this the same issue as @navneetkarnani?
- Is there a timeline for this fix? I have a workaround for now, but it forces the user to always reload which is annoying.
- Will you have an option in the future to not require a local Docker install if the user wants to use remote containers only?
This issue is still reproducible in code-insider. Any update?
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