NOTE: Most of the contents of this repository have been migrated to the new devcontainers GitHub org (https://github.com/devcontainers). See https://github.com/devcontainers/template-starter and https://github.com/devcontainers/feature-starter for information on creating your own!
I have a CMake project which I need to debug and compile for various platforms. For this specific example I use a minimalistic EulerOS image (it's almost empty, with nearly zero applications installed out of the box). This image comes from my company in-house registry, so in order to use it I manually create the following .devcontainer/devcontainer.json configuration which refers to my custom image:
Then, if I open the workspace from within WSL, and run Dev Containers: Reopen in Container it works just fine, i.e. VSCode automagically creates the container out of the image, mounts the workspace and keeps it running for me. However for my case I also need Kafka infrastructure, so I made a docker-compose.yaml configuration:
In this case, however, if I run Dev Containers: Reopen in Container, for some reason I have to mount the target service directory manually (by providing this information in the devcontainer.json file above). More importantly - VSCode doesn't maintain the persistence of the target service anymore in this case and get disconnected by timeout of tty mode.
Isn't VSCode supposed to keep it running and mount my workspace itself just like it does for single-image scenario? And if not, how do I handle it properly?
I have a CMake project which I need to debug and compile for various platforms. For this specific example I use a minimalistic EulerOS image (it's almost empty, with nearly zero applications installed out of the box). This image comes from my company in-house registry, so in order to use it I manually create the following
.devcontainer/devcontainer.json
configuration which refers to my custom image:Then, if I open the workspace from within WSL, and run
Dev Containers: Reopen in Container
it works just fine, i.e. VSCode automagically creates the container out of the image, mounts the workspace and keeps it running for me. However for my case I also need Kafka infrastructure, so I made adocker-compose.yaml
configuration:And changed the devcontainer.json correspondingly:
In this case, however, if I run
Dev Containers: Reopen in Container
, for some reason I have to mount the target service directory manually (by providing this information in the devcontainer.json file above). More importantly - VSCode doesn't maintain the persistence of the target service anymore in this case and get disconnected by timeout of tty mode.Isn't VSCode supposed to keep it running and mount my workspace itself just like it does for single-image scenario? And if not, how do I handle it properly?