Run initializeCommand for `devcontainer build`
See original GitHub issueWhen
$ devcontainer build --workspace-folder .
Expected
By default, things like initialcommand
are called.
Actual
Things like initialcommand
are not called.
Feat
All default things vscode devcontainer does, like xxxcommand
, extensions, cwd…
$ ls .devcontainer/devcontainer.json
.devcontainer/devcontainer.json
$ devcontainer vscode build
Run initialcommand
...
Start: Run: docker build
Step 1: FROM
Step 2: RUN xxx
Step 3: RUN xxx
...
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Start a processes when a container starts - Visual Studio Code
The easiest way to do this is using the postStartCommand property in devcontainer.json . For example, if you wanted to run yarn install...
Read more >Test: "initializeCommand" in devcontainer.json #2407 - GitHub
"initializeCommand" in the devcontainer.json is an optional property that can be set to a string (run in a shell) or an array of...
Read more >Dev Container metadata reference
The devcontainer.json file contains any needed metadata and settings required to configurate a development container for a given well-defined tool and ...
Read more >Configuring environment variables prior to creation of dev ...
My solution is to create an env file in the initializeCommand and pass it with the build context. Here is the .devcontainer/devcontainer.
Read more >Using Docker as a Dev Environment with VS Code: Part 2
Let's set up this app to run in a set of Docker containers using this ... and volume exist before creating containers "initializeCommand": ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@loynoir Make sure you use
"initializeCommand"
. That should work.build
only builds the image.up
will also run the commands:devcontainer up --workspace-folder .
Does that make it work?