Dev Container Connection Fails: Cursor Attempts to Run docker Inside Container Instead of Host?

Describe the Bug

When attaching to a remote container using Cursor (via Remote-SSH and Dev Containers), Cursor attempts to run docker info inside the container, rather than on the remote host. Since most containers do not include Docker or the Docker socket, this results in the error: spawn docker ENOENT This breaks the container development workflow, even though Docker is properly installed and working on the host system.

Steps to Reproduce

Open Cursor on your local machine.I am connecting from Windows to a TencentOS server via Remote-SSH.

Use Remote-SSH to connect to a remote Linux server that has Docker installed on the host.

In the Remote Explorer sidebar, locate an already running Docker container on the remote host.

Use the “Attach to Container” action to connect to the container.

Cursor tries to execute docker info inside the container.

This results in the error:
spawn docker ENOENT

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

版本: 1.2.4 (user setup)
提交: 1.99.3
日期: a8e95743c5268be73767c46944a71f4465d05c90
Electron: 2025-07-10T17:09:01.383Z
ElectronBuildId: 34.5.1
Chromium: undefined
Node.js: 132.0.6834.210
V8: 20.19.0
OS: 13.2.152.41-electron.0

Additional Information

2025-07-12 18:13:54.659 [info] [docker container]: Running command: docker
2025-07-12 18:13:54.888 [info] [docker container]: Command completed with exit code 0
2025-07-12 18:13:54.979 [info] Devcontainer CLI written to /tmp/devcontainer-cli-e2467927-f22c-49b8-918a-a2a6dc5a78e3
2025-07-12 18:13:54.998 [info] Copying forwarder.js to /tmp/devcontainer-cli-e2467927-f22c-49b8-918a-a2a6dc5a78e3
2025-07-12 18:13:55.052 [info] Copying forwarderk8s.js to /tmp/devcontainer-cli-e2467927-f22c-49b8-918a-a2a6dc5a78e3
2025-07-12 18:14:02.317 [info] Attaching to container in current window: video_clip_api_testconn
2025-07-12 18:14:03.996 [info] No remote exec server found for authority: dev-container+7b2273657474696e6754797065223a22636f6e7461696e6572222c22636f6e7461696e65724964223a22653962333961363139633462227d; using local
2025-07-12 18:14:03.996 [info] Resolving dev container authority ‘dev-container+7b2273657474696e6754797065223a22636f6e7461696e6572222c22636f6e7461696e65724964223a22653962333961363139633462227d’ (attempt #1) container ‘{“settingType”:“container”,“containerId”:“e9b39a619c4b”}’
2025-07-12 18:14:03.996 [info] Starting Dev Containers dev-container+7b2273657474696e6754797065223a22636f6e7461696e6572222c22636f6e7461696e65724964223a22653962333961363139633462227d
2025-07-12 18:14:03.996 [info] Spawned process undefined: ‘docker’ ‘info’
2025-07-12 18:14:03.996 [info] [docker info]: Running command: docker
2025-07-12 18:14:03.996 [error] [docker info]: Running command: docker
2025-07-12 18:14:03.996 [error] Error resolving dev container authority Failed to check Docker version – is docker installed and running?: [docker info] Command failed with exit code 1: spawn docker ENOENT: stdout:

Does this stop you from using Cursor

Yes - Cursor is unusable

Hi @user247, this error means we were unable to find docker on the remote machine. We do not try to run docker inside the container itself. When connecting via SSH, we do source the standard ~/.bashrc, ~/.bash_profile, or ~/.profile files.

Could you ensure that the correct folders are on the PATH so the docker command will resolve?

Seeing this same thing. Also making Cursor unusable. At least for me, I confirmed that it’s trying to run the docker command on my laptop, not the remote machine, or the container. Seems like maybe “using local” is the important bit here. I’ve tried removing .cursor-server on the remote, clicking reinstall server, reloading, etc.

Cursor Version

Version: 1.2.4
VSCode Version: 1.99.3
Commit: a8e95743c5268be73767c46944a71f4465d05c90
Date: 2025-07-10T16:53:59.659Z (5 days ago)
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.5.0

Dev Containers Output
2025-07-15 13:10:21.144 [info] No remote exec server found for authority: dev-container+7b2273657474696e6754797065223a22636f6e7461696e6572222c22636f6e7461696e65724964223a22353561666538366539663062227d; using local

2025-07-15 13:10:21.144 [info] Resolving dev container authority 'dev-container+7b2273657474696e6754797065223a22636f6e7461696e6572222c22636f6e7461696e65724964223a22353561666538366539663062227d' (attempt #1) container '{"settingType":"container","containerId":"55afe86e9f0b"}'

2025-07-15 13:10:21.144 [info] Starting Dev Containers dev-container+7b2273657474696e6754797065223a22636f6e7461696e6572222c22636f6e7461696e65724964223a22353561666538366539663062227d

2025-07-15 13:10:21.144 [info] Spawned process undefined: 'docker' 'info'

2025-07-15 13:10:21.144 [info] [docker info]: Running command: docker

2025-07-15 13:10:21.144 [error] [docker info]: Running command: docker

2025-07-15 13:10:21.144 [error] Error resolving dev container authority Failed to check Docker version -- is docker installed and running?: [docker info] Command failed with exit code 1: spawn docker ENOENT: stdout: