Skip to content

Attach VSCode to Remote Container fails #11324

@Patrock

Description

@Patrock

Type: Bug

When i create a ssh tunnel between a remote DOCKER SOCKET and tcp://127.0.0.1:12375 and add this to DOCKER_HOST Extension setting in Container Tools i can see the remote Containers under Container Tools extension view. I can attach a shell and inspect the container but when i want to attach to VSCode it fails with error:

Error running command remote-containers.attachToRunningContainerFromViewlet: Command failed: docker inspect --type container 4e51277d9bf444e2045d0851ad0ae0dc2dd4f990e9860b91f9a69576bd00bd6e. This is likely caused by the extension that contributes remote-containers.attachToRunningContainerFromViewlet.

Using the SSH-tunneled socket in my Terminal also works. I could not get any proper logs from dev container logs.

On my desktop environment it does works, on many other machines from collegues and students it wont work. Tested different versions and pre-releases. A freshly installed windows 11 with VS Code and VS Code insiders also fails.

When i first SSH-connect VSCode to remote host without SSH tunnel and attach from there it works too.

Extension version: 2.3.0
VS Code version: Code - Insiders 1.107.0-insider (7ba6cc6685504e207bf21dcefde21eb300cfa132, 2025-11-17T05:05:47.761Z)
OS version: Windows_NT x64 10.0.26100
Modes:
Connection to 'SSH: 10.50.60.180' could not be established

App Host: desktop
Remote Name: undefined
Language: en

System Info
Item Value
CPUs 13th Gen Intel(R) Core(TM) i7-13700H (20 x 2918)
GPU Status 2d_canvas: enabled
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
trees_in_viz: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 63.74GB (27.35GB free)
Process Argv
Screen Reader no
VM 0%

Connection to 'SSH: 10.50.60.180' could not be established

Metadata

Metadata

Assignees

Labels

containersIssue in vscode-remote containers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions