5

When cloning a repository into a volume with the vscode remote extension for containers, an Alpine linux is downloaded from docker.io to bootstrap the volume (initially). This is only used to create the volume. The image which is then used for my application is the correct one I specified in the Dockerfile (not alpine).

How can I set a custom bootstrap image for bootstrapping the volume? The main reason for this is the security aspect: Only internal images should be used.

Edit: It seems that the bootstrap.Dockerfile can be manually changed in the extension's folder (<user-folder>/.vscode/extensions/ms-vscode-remote.remote-containers-<version>/scripts/volumeBootstrap.Dockerfile), but this is not an appropriate solution. How can this file path be specified in e.g. the devcontainer.json or somewhere else?

ssc-hrep3
  • 15,024
  • 7
  • 48
  • 87
  • Do you mean the repo you're cloning already has the `devcontainer.json` which is configured to use the Alpine image? Do you control that repo? – Max Ivanov Feb 26 '21 at 21:29
  • 1
    @MaxIvanov Hi Max, actually I would like to set another image for bootstrapping the Docker volume (i.e. an internal, scanned version of e.g. alpine linux). The image I specified is then correctly loaded afterwards. – ssc-hrep3 Jun 24 '21 at 15:49
  • 1
    The information in the Edit was very valuable for me to make this happen at all. I agree this needs to be able to be specified in devcontainer.json. For my use, I needed to bootstrap the container on an off-network computer. I'm going to explore what it would take to add this to devcontainer.json – aughey May 20 '22 at 12:52

0 Answers0