microsoft / microsoft/vscode-remote-release
Code doesn't seem to be available to all containers defined in docker-compose.yml if cloned to a container volume
@chrmarti is already working on this.
Since Feb 24, 2025.
- Dominant language
- Dockerfile
- Stars
- 4.2k
- Forks
- 469
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
- VSCode Version: 1.97.2
- Local OS Version: Windows 11 (ARM)
- Remote OS Version: Linux (in the devcontainer)
- Remote Extension/Connection Type: Dev Containers
Steps to Reproduce:
- Clone tfenster/wiremock-demo into a folder
- Use "open folder in container" --> Wait for everything to start and check the file system in the wiremock container which is created as a second container through the docker-compose.yml definition
- Observe that there are files e.g. in the
/home/wiremock/mappingsfolder - Remove both containers
- Use "clone repository into a container volume" for the same repo --> Again, wait for everything to start and check the file system in the new wiremock container.
- Oserve that there are no files e.g. in the
/home/wiremock/mappingsfolder
Does this issue occur when you try this locally?: No, because it is bound to container volumes
Does this issue occur when you try this locally and all extensions are disabled?: No, because it is bound to container volumes
I think the problem is that the devcontainer itself has access to the container volume with the cloned code, so the volume mapping like this in the docker-compose.yml works:
services:
devcontainer:
...
volumes:
- ../..:/workspaces:cached
...
But for the second container, this doesn't work, I think because it doesn't have access to the container volume where the cloned code is stored
...
wiremock:
...
volumes:
- ../wiremock/extensions:/var/wiremock/extensions
- ../wiremock/__files:/home/wiremock/__files
- ../wiremock/mappings:/home/wiremock/mappings
...
Am I right? Can I somehow overcome that issue? I have files in my repo which are tightly connected, so I would like to keep them in one repo, but some are needed in the second container. Therefore, it would make sense in my scenario to have access to the volume with the cloned code from both containers
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.