microsoft / microsoft/vscode-remote-release

Containers Remote Explorer doesn't reopen a dev container built with a different Docker context

Open
#6,065 0 comments 1 reaction 1 assignee View on GitHub

@chrmarti is already working on this.

Since Dec 16, 2021.

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

Description

  • VSCode Version: 1.64.0-insider (Universal)
  • Local OS Version: OS X 12.1
  • Remote OS Version: WSL 2 20.04.3 LTS (Focal Fossa)
  • Remote Extension/Connection Type: Docker

Steps to Reproduce:

  1. Use the Docker extension to change the context to a different machine (e.g. from desktop-linux to remote-server). Confirm with docker context list that remote-server is active.
  2. Clone Repository in a Remote Volume and paste in the git repository URL. The container is built on remote-server and Dev Container: Python 3 @ remote-server shows in green remote box.
  3. Close VS Code.
  4. Open a new window.
  5. Confirm in the Docker extension that the context is still remote-server.
  6. Go to Remote Explorer... Containers. Select the container we just created and click "Open folder in container".
  7. Instead of reopening the container using remote-server, it builds a new container on desktop-linux, and the green box shows Dev Container: Python 3.

I expected that I could use the Containers remote extension as a bookmark to reconnect to the existing container on the remote server, but maybe this is by design?

As a workaround, if I Clone Repository in a Remote Volume and paste in the git repository URL again, instead of rebuilding the container it will just connect to and use the existing container on the remote server.

Thanks!

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.