go feature: "init:true" prevents any further use cases that require "init:false", such as running systemd as PID1
Maintainers usually reply within 3 days
@v-Kaniska244 is already working on this.
Since Nov 5, 2026.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Domain
- devops, infrastructure
Research direction
Start by reading the Go feature's devcontainer-feature.json and trace how its init setting is combined with devcontainer.json settings. Check whether the feature needs init: true for process cleanup, then compare the behavior with the use case in the issue. Done means either users can disable init for the Go feature or its reason is documented.
Written by the indexing model from the issue text.
Description
The go feature's devcontainer-feature.json sets "init": true. Unfortunately, I couldn't find any documentation, commit message or issue that explains the reason(ing) behind this forced setting. Because of the way the CLI merges init, no devcontainer.json can turn it back off. Any devcontainer that needs its own PID1, such as systemd, can't use the go feature.
Use Case
Running systemd as PID1 in a devcontainer to test against certain systemd behavior tied to PID1 as opposed to running systemd as non-PID1. For example:
{
"build": { "dockerfile": "Dockerfile" }, // ENTRYPOINT ["/usr/lib/systemd/systemd"]
"overrideCommand": false,
"init": false,
"privileged": true,
"features": {
"ghcr.io/devcontainers/features/go:1": {}
}
}
Without the go feature this works: the CLI's /bin/sh -c '… exec "$@"' wrapper execs the image's ENTRYPOINT, so systemd becomes PID1.
But when adding the go feature, the CLI combines init from devcontainer.json and all features so that any true wins. The container is then started with --init, tini becomes PID1, and systemd refuses to start because it isn't PID1. The explicit "init": false in devcontainer.json is ignored.
- The Go definition this feature replaced (
microsoft/vscode-dev-containers,containers/go) used only--cap-add=SYS_PTRACE --security-opt seccomp=unconfined, without--init. - Might
init: truebe set so that leftover processes get cleaned up (for example after Delve kills a debugged program, or child processes fromgo testandgopls)? - Feature metadata can't depend on options, so users have no way to opt out today.
Would it be possible to remove this setting? If not, could you please document the reason why it is needed with this feature?
- Dominant language
- Shell
- Stars
- 1.6k
- Forks
- 626
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 7
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from devcontainers/features
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
devcontainers/features#1776 · 1 comment ·
Maintainers usually reply within 3 days
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
devcontainers/features#1770 ·
Maintainers usually reply within 3 days
-
replica-skillOpen
Difficulty 4/5 3-5 days Newbie friendliness 5/100
devcontainers/features#1775 ·
Maintainers usually reply within 3 days
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
devcontainers/features#1774 ·
Maintainers usually reply within 3 days
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
devcontainers/features#1772 ·
Maintainers usually reply within 3 days
All issues in devcontainers/features
Similar issues
-
agents area: runtime automation chore cli consistency dependencies developer-experience difficulty: easy documentation enhancement good first issue help wanted hygiene json-output priority: P3 starters tests
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
area:claude-code-web bug has repro platform:linux platform:web
Difficulty 1/5 Under an hour Newbie friendliness 66/100
anthropics/claude-code#110168 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
btclib-org/portanode#968 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
agents area: runtime automation chore cli consistency dependencies developer-experience difficulty: easy documentation enhancement good first issue help wanted hygiene json-output priority: P3 starters tests
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
flisk-sh/flisk-example#41 ·
Maintainers usually reply within 1 day