Shreeram Silwal
Shreeram Silwal
CCoder.com
Created by Shreeram Silwal on 10/23/2024 in #help
initializeCommand not executed in envbuilder
I have the below configuration on the devcontainer.json file and I want to run some scripts before dockerbuild starts but the "initializeCommand" is not executed when the container is started.
{
"name": "poc",
"initializeCommand": "bash .devcontainer/update.sh",
"build": {
"dockerfile": "Dockerfile",
},
"service": "app",



"remoteUser": "node",
"features": {
"ghcr.io/devcontainers/features/git:1": {
"version": "os-provided"
}
}
}
{
"name": "poc",
"initializeCommand": "bash .devcontainer/update.sh",
"build": {
"dockerfile": "Dockerfile",
},
"service": "app",



"remoteUser": "node",
"features": {
"ghcr.io/devcontainers/features/git:1": {
"version": "os-provided"
}
}
}
There are not logs for this as well i can only see logs starting from building image
envbuilder - Build development environments from repositories in a container

#1: :package: Cloning https://github.com/****/**** to /workspaces/poc

#1: :package: The repository already exists! [4.421296ms]
#2: Deleting filesystem...
#2: :construction_site: Building image...
envbuilder - Build development environments from repositories in a container

#1: :package: Cloning https://github.com/****/**** to /workspaces/poc

#1: :package: The repository already exists! [4.421296ms]
#2: Deleting filesystem...
#2: :construction_site: Building image...
can anyone help me with the why this config not working?
6 replies