Skip to content

Lifecycle scripts from dev container features are not executed #1880

Open
@Maetveis

Description

@Maetveis

What happened?

Lifecycle scripts from dev container features like onCreateCommand are not executed.

What did you expect to happen instead?

Lifecycle scripts are executed when specified in a devcontainer feature, as described by the spec: https://containers.dev/implementors/features/#lifecycle-hooks

How can we reproduce the bug? (as minimally and precisely as possible)

> mkdir feature
> tee feature/devcontainer-feature.json >/dev/null <<'JSON'
{
  "id": "id",
  "version": "0.0.1",
  "name": "name",
  "onCreateCommand": "echo \"Hello From Feature\""
}
JSON
> touch feature/install.sh

My devcontainer.json:

{
    "image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04",
    "features": {
        "./feature": {}
    },
}

Run devpod up --debug up <path-to-worspace> and observe that "Hello From Feature" is not printed.

Local Environment:

  • DevPod Version: v0.6.15
  • Operating System: linux
  • ARCH of the OS: AMD64

DevPod Provider:

  • Local/remote provider: docker

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions