microsoft / microsoft/vscode-remote-release
Containers Remote Explorer doesn't reopen a dev container built with a different Docker context
Open
@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:
- Use the Docker extension to change the context to a different machine (e.g. from
desktop-linuxtoremote-server). Confirm withdocker context listthatremote-serveris active. - Clone Repository in a Remote Volume and paste in the git repository URL. The container is built on
remote-serverandDev Container: Python 3 @ remote-servershows in green remote box. - Close VS Code.
- Open a new window.
- Confirm in the Docker extension that the context is still
remote-server. - Go to Remote Explorer... Containers. Select the container we just created and click "Open folder in container".
- Instead of reopening the container using
remote-server, it builds a new container ondesktop-linux, and the green box showsDev 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.