Read build args from env file i.e. private npm registry #5475
Labels
containers
Issue in vscode-remote containers
feature-request
Request for new features or functionality
Milestone
❓ It would be nice if VScode devcontainer.json supports reading build args from a file. So we won't need this workaround:
I have found a workaround to set ENV vars from a file during the docker BUILD. This is i.e. necessary if you want to use a private NPM registry during build, but you don't want to write the secrets in devcontainer.json or Dockerfile, as these files are committed to the repo.
.devcontainer/devcontainer.env ( add this file to .gitignore )
In the Dockerfile:
EDIT:
Another option to solve this would be to add a
prebuild:
property / script to devcontainer.json analog topostbuild:
.This could be even more flexible as users can copy files to the context, read envs via shell scripts and many more operations that are usually possible by calling docker build manually.
The text was updated successfully, but these errors were encountered: