Open
Description
When a devcontainer is built lifecycle scripts can be included in the metadata. If this is the case envbuilder fails to unmarshal the metadata embedded in the OCI image. I believe envbuilder is trying to parse the metadata using the Spec struct in devcontainer.go file.
{
"Name": "my-image",
"Digest": "sha256:ad63b47f418820329b1f0aa0f707ad590cc6b63efdc9de86bdd76f1fa6c329b0",
"RepoTags": [
"latest"
],
"Created": "2025-05-17T03:14:27.157348203Z",
"DockerVersion": "",
"Labels": {
"devcontainer.metadata": "{\"postAttachCommand\":\"bash /scripts/entrypoint.bash\",\"containerEnv\":{\"DISPLAY\":\"${localEnv:DISPLAY}\",\"VISUAL\":\"code --wait\",\"EDITOR\":\"code --wait\",\"GIT_EDITOR\":\"code --wait\",\"CC\":\"/usr/bin/clang\",\"CXX\":\"/usr/bin/clang++\"}}",
"io.buildah.version": "1.39.4",
"org.opencontainers.image.ref.name": "ubuntu",
"org.opencontainers.image.version": "22.04"
},
...
Metadata
Metadata
Assignees
Labels
No labels