vscode-remote-release
vscode-remote-release copied to clipboard
An error occured setting up the container - Remote Docker
Type: Bug
Hi. In the latest extension update I can't open remote Docker container. Getting this popup "An error occured setting up the container" immediately when I click on "Reopen in Container button". Here is output from the extension log:
[3315 ms] Remote-Containers 0.251.0 in VS Code 1.71.0 (784b0177c56c607789f9638da7b6bf3230d47a8c).
[3315 ms] Start: Run: docker version --format {{.Server.APIVersion}}
[4390 ms] 1.41
[4415 ms] Start: Run: /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper --ms-enable-electron-run-as-node /Users/user/.vscode/extensions/ms-vscode-remote.remote-containers-0.251.0/dist/spec-node/devContainersSpecCLI.js read-configuration --workspace-folder /Users/user/remote_workspaces/repo/user1 --log-level debug --log-format json --config /Users/user/remote_workspaces/repo/user1/.devcontainer/devcontainer.json --mount-workspace-git-root true
[4635 ms] remote-containers 0.251.0.
[4635 ms] Start: Run: git rev-parse --show-cdup
[4656 ms] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/Users/user/remote_workspaces/repo/user1
[4735 ms] Command failed: docker ps -q -a --filter label=devcontainer.local_folder=/Users/user/remote_workspaces/repo/user1
[4741 ms] Exit code 1
Extension version: 0.251.0 VS Code version: Code 1.71.0 (Universal) (784b0177c56c607789f9638da7b6bf3230d47a8c, 2022-09-01T07:25:38.437Z) OS version: Darwin x64 21.6.0 Modes: Sandboxed: No
System Info
Item | Value |
---|---|
CPUs | Intel(R) Core(TM) i5-7267U CPU @ 3.10GHz (4 x 3100) |
GPU Status | 2d_canvas: enabled canvas_oop_rasterization: disabled_off direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled metal: disabled_off multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_renderer: enabled_on video_decode: enabled video_encode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: disabled_off |
Load (avg) | 2, 3, 3 |
Memory (System) | 16.00GB (0.49GB free) |
Process Argv | --crash-reporter-id 68ec96f8-6abf-4e40-99f4-f584612269ab |
Screen Reader | no |
VM | 0% |
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
vscorecescf:30445987
pythondataviewer:30285071
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411cf:30557515
vsaa593cf:30376535
pythonvs932:30410667
cppdebug:30492333
pylanb8912:30545647
vsclangdf:30486550
c4g48928:30535728
hb751961:30553087
dsvsc012cf:30540253
azure-dev_surveyone:30548225
i497e931:30553904
In case it's helpful, I've run into the same problem this morning too. Similar output in my logs:
[2239 ms] Remote-Containers 0.251.0 in VS Code 1.71.0 (784b0177c56c607789f9638da7b6bf3230d47a8c).
[2238 ms] Start: Run: docker version --format {{.Server.APIVersion}}
[4256 ms] 1.41
[4276 ms] Start: Run: /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper --ms-enable-electron-run-as-node /Users/adamt/.vscode/extensions/ms-vscode-remote.remote-containers-0.251.0/dist/spec-node/devContainersSpecCLI.js read-configuration --workspace-folder /Users/adamt/Development/torch-ssic --log-level debug --log-format json --config /Users/adamt/Development/torch-ssic/.devcontainer/devcontainer.json --mount-workspace-git-root true
[4393 ms] remote-containers 0.251.0.
[4393 ms] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/Users/adamt/Development/torch-ssic
[4475 ms] Command failed: docker ps -q -a --filter label=devcontainer.local_folder=/Users/adamt/Development/torch-ssic
[4476 ms] Exit code 1
Downgrading to Remote-Containers 0.245.2 (still using VS Code 1.71.0) has temporarily fixed the problem for me.
Does running docker ps -q -a --filter label=devcontainer.local_folder=/Users/user/remote_workspaces/repo/user1
in the terminal return a non-zero exit code? (You can check with echo $?
right after running the above command.)
Is this the full log?
Strange, I'm getting return code 0 regardless whether container with that label exists or not on the remote server. Yes it's a full log
I have the same behavior with a docker rootless installation (0.245.2 works, 0.251.0 doesn't with the exact same log). The 0.251.0 works on another computer with docker as a non-root user.
The PATH for the rootless docker binary is located in $HOME/bin instead of /usr/local/bin, can it be the culprit ?
@bakaleks Are you using Docker in rootless mode too?
@dkgs The path of the binary shouldn't make a difference. Just make sure the correct binary is on the PATH or set the Docker Path
user setting for the Remote-Containers (currently being renamed to Dev Containers) extension to the full path of the Docker binary.
@chrmarti Using via Remote Docker CLI https://code.visualstudio.com/remote/advancedcontainers/develop-remote-host#_connect-using-the-docker-cli
@bakaleks What's your Docker host setting?
@chrmarti "docker.host":"ssh://myuserid@somehostname"
@bakaleks What do you get for docker --host ssh://myuserid@somehostname version
?
@chrmarti it started working again in 0.255.2. Thanks.
@adamtupper @dkgs Are you still seeing this with the latest version?
Sorry for the delay! Unfortunately it's still not working for me. I receive this pop-up message:
Command 'Dev Containers: Reopen in Container' resulted in an error (Command failed: /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper --ms-enable-electron-run-as-node /Users/adamt/.vscode/extensions/ms-vscode-remote.remote-containers-0.255.3/dist/spec-node/devContainersSpecCLI.js read-configuration --workspace-folder /Users/adamt/Development/torch-ssic --log-level debug --log-format json --config /Users/adamt/Development/torch-ssic/.devcontainer/devcontainer.json --include-merged-configuration --mount-workspace-git-root true)
The last working version for me is still 0.245.2
I also am having this issue on the latest version and downgrading to 0.245.2 fixed it for me for now. I'm receiving a very similar error to @adamtupper but on Windows 10.
This could be caused by the Docker daemon not responding (e.g., when it is not accepting connections yet after a restart) when using DOCKER_HOST
.
A downgrade to 0.245.2 fixed this is my case too.
Updating Docker for Mac fixed the problem for me. Everything is now working with the latest versions of VS Code and the Dev Containers extension.
Forked and pulled down the latest from container-apps-store-api-microservice and get this error message as soon as I fire up the devcontainer. VScode -
No changes have been made to the source prior to opening.
I also am having this issue on the latest version and downgrading to 0.245.2 fixed it for me for now. I'm receiving a very similar error to @adamtupper but on Windows 10.
How do you downgrade?
@ch3njust1n to change the version of an extension, click the down arrow on the Uninstall button. This gives the option for installing a different version.
I have similar issue when trying to run a compose dev container.
On an empty project, adding a dev container using vs code works, but when use the docker outside docker compose
option, then I get the same error
Error: An error occurred setting up the container.
[2023-01-07T05:09:48.435Z] at loe (/home/jesper/.vscode/extensions/ms-vscode-remote.remote-containers-0.266.1/dist/spec-node/devContainersSpecCLI.js:1832:2820)
[2023-01-07T05:09:48.435Z] at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
This works on
- Mac M1 + docker desktop
- Windows 11 + docker desktop
- WSL + docker desktop
Does not work on
- ubuntu on parallels on Mac M1
- ubuntu on hyperV Windows 11