microsoft / microsoft/vscode-remote-release

Initial Docker command is executed on local instead of remote machine

Open
#7,603 2 comments 0 reactions 1 assignee View on GitHub

@chrmarti is already working on this.

Since Dec 5, 2022.

bug containers
Dominant language
Dockerfile
Stars
4.2k
Forks
470
Avg merge
1d 1h
Merged PRs (30d)
1

Description

  • VSCode Version: 1.73.1
  • Local OS Version: Windows 10
  • Remote OS Version: Debian 9
  • Remote Extension/Connection Type: SSH + Containers
  • Logs:
[2747 ms] Remote-Containers 0.255.4 in VS Code 1.73.1 (6261075646f055b99068d3688932416f2346dd3b).
[2746 ms] Start: Run: docker version --format {{.Server.APIVersion}}
[3335 ms] 
[3335 ms] error during connect: This error may indicate that the docker daemon is not running.: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/version": open //./pipe/docker_engine: The system cannot find the file specified.

Steps to Reproduce:

  1. A Docker daemon is running on the remote machine
  2. SSH agent is setup, so I can do ssh <user_name>@<server_name> to login using my SSH keys
  3. In the Docker settings, the DOCKER_HOST variable is set to ssh://<user_name>@<server_name>
  4. A (simplified version) of our .devcontainer.json file:
{
    "name": "${localEnv:VSCODE_USER_NAME}_vscode",
    "workspaceFolder": "/git",
    "workspaceMount": "src=/home/${localEnv:VSCODE_USER_NAME}/git/,dst=/git/,type=bind",
    "runArgs": [
        "-u",
        "my_user_name",
        "--name",
        "${localEnv:VSCODE_USER_NAME}_vscode",
        "-v",
        "/home/${localEnv:VSCODE_USER_NAME}/mnt:/mnt"
    ],
    "settings": {
        "terminal.integrated.defaultProfile.linux": "bash", 
        "terminal.integrated.profiles.linux": {
            "bash": {
                "path": "/bin/bash"
            }
        }
    },
    "shutdownAction": "none",
    "extensions": []
}
  1. CTRL+SHIFT+p > Dev Containers: Open Folder in Container... and browse to the folder with the .devcontainer sub-folder

On my previous Windows system, this results in a log similar to this:

[97 ms] Remote-Containers 0.245.2 in VS Code 1.73.1 (6261075646f055b99068d3688932416f2346dd3b).
[96 ms] Start: Resolving Remote
[108 ms] Setting up container for folder or workspace: k:\git\vscode\environment
[108 ms] Host: ssh://my_user_name@remote_server_name
[108 ms] Local Docker: true
[113 ms] Start: Check Docker is running
[113 ms] Start: Run: docker version --format {{.Server.APIVersion}}
[3100 ms] Server API version: 1.40

However, now for some reason the "Start: Resolving Remote" step is skipped and the docker version --format {{.Server.APIVersion}} is executed on my local machine instead of on the remote machine, which of coarse fails:

[2747 ms] Remote-Containers 0.255.4 in VS Code 1.73.1 (6261075646f055b99068d3688932416f2346dd3b).
[2746 ms] Start: Run: docker version --format {{.Server.APIVersion}}
[3335 ms] 
[3335 ms] error during connect: This error may indicate that the docker daemon is not running.: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/version": open //./pipe/docker_engine: The system cannot find the file specified.

I have the same issue with version 0.262.3, but I only get a pop-up with message "An error has occurred setting up the container.", I couldn't find a way to retrieve a corresponding log when using the latest version.

What could cause the "Start: Resolving Remote" step to be skipped skipped?

Does this issue occur when you try this locally?: N/A
Does this issue occur when you try this locally and all extensions are disabled?: N/A

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.