Is it possible to open files in a Docker container in my local operating system outside of the container using the Remote Development extension for VSCode (such as using right-click 'Open in Explorer' as in the Remote - WSL extension for VSCode)
I tried to:
- Build Docker Image Without Context
- Mount filesystem Volume so that I could access files in my operating system from my container without copying.
To build without context I can use docker build - < Dockerfile
(see docker docs).
I can mount files via docker run -v <path-to-file-in-host>:<path-to-file-in-container> IMAGE_NAME
(as discussed here, and in docker docs here)
From the devcontainer.json reference it's possible to pass build args to Docker build in your devcontainer.json but this doesn't work for the - <
as vscode-dev-containers defaults to including build context...
The extension also also automatically runs a container after build so I'm not sure how to override this.
Any tips would be much appreciated!