devcontainer.json cannot use exported vars from initializeCommand #6983
Labels
containers
Issue in vscode-remote containers
feature-request
Request for new features or functionality
Milestone
Version: 1.69.2 (user setup)
Commit: 3b889b090b5ad5793f524b5d1d39fda662b96a2a
Date: 2022-07-18T16:12:52.460Z
Electron: 18.3.5
Chromium: 100.0.4896.160
Node.js: 16.13.2
V8: 10.0.139.17-electron.0
OS: Windows_NT x64 10.0.19044
The initializeCommand is advertised to run as the very first step, but it cannot be used to have any meaningful effect on the devcontainer.json itself. For example none of the following is possible:
We use several docker images in production and we use them locally by inheriting from them and building a new image with all the user specific things, and run them in a user specific way (proxy, extensions, CCACHE settings, etc).
It'd be nice to keep the devcontainer.json as a generic template and have initializeCommand do whatever it wants and to use these effects in the devcontainer.json. This way we could use scripts to extract image versions, parse various untracked user files for CCACHE configs, etc, so that each user can fine tune the environment without having a dirty working tree.
Steps to Reproduce:
The text was updated successfully, but these errors were encountered: