I have an application consisting of a Flask web
application and a RQ worker
application. Both live in separate containers but use the same image. I would like to use Visual Studio Code's Remote Extension to run the containers and debug inside them. This all works well for either container using devcontainer.json
and the automatically generated .devcontainer/docker-compose.yml
which overwrite mine partially.
This Article explains that connecting to multiple containers is possible using multiple windows. They assume the two containers to have different source, stored in different folders which can be used to store separate devcontainer.json
files.
I don't understand though how to configure the startup. When starting any of the two containers I would need the other one to start as well. That's easily achieved using the original docker-compose.yml
. I could then manually run and debug the application in the started devcontainer.
Yet how would I connect to the other, then also running container and run and debug there?