microsoft / microsoft/vscode-remote-release
[docker-compose] Only rebuild target "service" on container rebuild
@chrmarti is already working on this.
Since Apr 24, 2020.
- Dominant language
- Dockerfile
- Stars
- 4.2k
- Forks
- 470
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
For repositories that have multiple containers, it should be possible to limit rebuilds to the single service targeted by devcontainer.json when using docker-compose.
Given a repository like:
monorepo/
monorepo.code-workspace
docker-compose.yml
backend/
Dockerfile
.devcontainer/
devcontainer.json
frontend/
Dockerfile
.devcontainer/
devcontainer.json
Modifications to either devcontainer.json will require triggering a rebuild, but doing so appears to run basically the raw docker-compose build command and then remove/start all containers. (As opposed to docker-compose build backend or docker-compose build frontend.)
In turn, if one VSCode window is open for each of the containers the container not being rebuilt will lose connection to the container since it's been destroyed.
This problem will be more acute if the improved multi-container support in #1460 is implemented but could also be solved separately.
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.