I found a couple other questions around here like this, with no answers.
I am using this project to prebuild a devcontainer and push it to Github Container Registry: https://github.com/devcontainers/ci/blob/main/docs/github-action.md
The relevant Github action step looks like this:
- name: Build and run Dev Container task
uses: devcontainers/ci@v0.3
with:
imageName: "ghcr.io/${{ env.OWNER_LC }}/dev-infra-environment"
cacheFrom: "ghcr.io/${{ env.OWNER_LC }}/dev-infra-environment"
push: filter
refFilterForPush: refs/heads/main
After reviewing the logs, the postCreateCommand
defined in the devcontainer.json
is not executed. And when I pull the image in vscode to use as a devcontainer, it runs the postCreateCommand
then.
Is there a way to get the postCreateCommand
(or some other mechanism) to run when the devcontainer is being built, so that everything is included in the final image? Documentation is really sparse on this, or any other mechanism for prebuilding devcontainers.