Repository navigation
Open
Labels
Milestone
Description
I'm always on the travel, and whenever I'm on travel and want to use my devcontainer the annoying inspect command fails to let an image that already available on my machine run. this behavior contradict with the purpose of a container for development.
here is the log
[28853 ms] Start: Run: docker inspect --type image mcr.microsoft.com/devcontainers/typescript-node:1-22-bullseye
[38885 ms] Error fetching image details: getaddrinfo EAI_AGAIN mcr.microsoft.com
[38886 ms] Start: Run: docker pull mcr.microsoft.com/devcontainers/typescript-node:1-22-bullseye
Error response from daemon: Get "https://mcr.microsoft.com/v2/": dialing mcr.microsoft.com:443 container via direct connection because has no HTTPS proxy: resolving host mcr.microsoft.com: lookup mcr.microsoft.com: no such host
[49177 ms] []
[49177 ms] Error response from daemon: No such image: mcr.microsoft.com/devcontainers/typescript-node:1-22-bullseye
[49178 ms] Error: Command failed: docker inspect --type image mcr.microsoft.com/devcontainers/typescript-node:1-22-bullseye
[49178 ms] at utA (/home/me-wsl-ubuntu/.vscode-remote-containers/dist/dev-containers-cli-0.380.0/dist/spec-node/devContainersSpecCLI.js:410:3925)
[49178 ms] at async KtA (/home/me-wsl-ubuntu/.vscode-remote-containers/dist/dev-containers-cli-0.380.0/dist/spec-node/devContainersSpecCLI.js:482:3944)
[49178 ms] at async eB (/home/me-wsl-ubuntu/.vscode-remote-containers/dist/dev-containers-cli-0.380.0/dist/spec-node/devContainersSpecCLI.js:482:4886)
[49178 ms] at async hrA (/home/me-wsl-ubuntu/.vscode-remote-containers/dist/dev-containers-cli-0.380.0/dist/spec-node/devContainersSpecCLI.js:663:200)
[49178 ms] at async lrA (/home/me-wsl-ubuntu/.vscode-remote-containers/dist/dev-containers-cli-0.380.0/dist/spec-node/devContainersSpecCLI.js:662:13452)
[49182 ms] Exit code 1
[49183 ms] Command failed: /home/me-wsl-ubuntu/.vscode-server/bin/fee1edb8d6d72a0ddff41e5f71a671c23ed924b9/node /home/me-wsl-ubuntu/.vscode-remote-containers/dist/dev-containers-cli-0.380.0/dist/spec-node/devContainersSpecCLI.js up --container-session-data-folder /tmp/devcontainers-39052ba1-5800-4957-8a44-73151d8d99941723878744611 --workspace-folder /home/me-wsl-ubuntu/thetutr/t1 --workspace-mount-consistency cached --id-label devcontainer.local_folder=\\wsl.localhost\Ubuntu\home\me-wsl-ubuntu\thetutr\t1 --id-label devcontainer.config_file=/home/me-wsl-ubuntu/thetutr/t1/.devcontainer/frontend-container/devcontainer.json --log-level debug --log-format json --config /home/me-wsl-ubuntu/thetutr/t1/.devcontainer/frontend-container/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --mount type=bind,source=/run/user/1000/wayland-0,target=/tmp/vscode-wayland-c739e546-90e1-48b4-b14a-acec85b609fb.sock --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root --include-configuration --include-merged-configuration
[49183 ms] Exit code 1
Reacted by Danny Slatkin, Alexander Kondratskiy, Vladimir Tsepenshchikov, Valentin Hăloiu, Achraf Aarab, Ivan Shumakov, Juan C. Andreu, Fernando Antivero, Dominik König, Johann Pardanaud and 16 more
Activity
chrmarti commentedon Aug 19, 2024
Related: #9034
dslatkin commentedon Sep 28, 2024
Big +1 to this.
One of the major selling points of dev containers was that it worked without an internet connection. My entire app has been architected to work offline for development - but now with the dev containers change that broke this functionality, all that effort no longer has any value because an internet connection is needed to start/connect to an already-created container.
parkeraddison commentedon Oct 10, 2024
Related to #1242, not sure we'll see a fix, but there may be some workarounds to try.
dslatkin commentedon Oct 10, 2024
This is the error message I see when I disconnect and reconnect without an internet connection to a dev container that has already been created:
FYI Christof Marti (@chrmarti)
It used to be that I could at least connect to an already-created container while offline. Not sure if this is a separate issue from this which seems more like a general feature request when trying to build a container, whereas this might be a regression?
andreujuanc commentedon Mar 26, 2025
This should have been fixed years ago. Please. If the docker image is present, there is no need for any internet connection. Simple.
dslatkin commentedon Mar 27, 2025
Agreed. It still pains me whenever I realize I've closed/disconnected my VS Code window and I don't have an internet connection, especially when on a flight. Hours of potential productivity gone.
westurner commentedon May 21, 2025
Does it need to cache the downloaded copy of vscode and then check the signature of the cached download before every install?
reenberg commentedon Jul 2, 2025
As far as I can see, then the code server binary is downloaded to /tmp, at least for the remote-container extension.
Would this issue not be fixed if the all the remote extensions just downloaded the binary to
~/.cache/Microsoft/...which already exists on my machine, and then defaulted to use the binary from there if the remote URL wasn't available?It seems that when the code server binary is downloaded, then it is for example stored as
vscode-server-linux-x64.tar.gz. Keeping this, would ensure that the cache folder only retains one version of the code server per architecture and operating system, and thus it would not grow unneeded.As long as this issue is purely related to users being offline due to being on the move, then this would seem like a "limited" period of time that the user is offline, for which a local cache would seem like a reasonable solution, as the user is very unlikely to update the OS, VS Code, or any extensions during this period.
Issue #6146 would then fix the scenario where the user is constantly disconnected/offline.
Am I missing something big that makes this a non trivial thing?
max06 commentedon Mar 14, 2026
Just to extend this issue a little bit:
The requirement to check for image updates (not even using "Rebuild without cache") also prevents us from using local images.
Example: I have a bakefile for docker, which is (still) not supported by this extension. This bakefile has a "dev"-target producing a local docker image with a specified tag, example "local/myproject:dev". After running
docker buildx build deva regular docker image with that defined tag is stored in docker. Specifying that image in my devcontainer.json asimage: "local/myproject:dev"causes the devcontainer build to fail - because it's looking up that image on docker.io, without ever being asked to do that.There is no need to do/force the lookup on the registry by yourself. You have a dockerfile-template that you fill with the content of
image, you rundocker build. Docker itself decides if pulling an image is necessary based on the existence of that image in the local cache.You can still to the
docker pullif the user selects "Rebuild without cache", but please stick to the default logic by letting docker do its job.In this case it's just about removing a line, in the devcontainer-cli repo, if I'm not mistaken.