go feature: "init:true" prevents any further use cases that require "init:false", such as running systemd as PID1
@v-Kaniska244 já está trabalhando nisso.
Desde 5/11/2026.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 55/100
- Tipo de issue
- Funcionalidade
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Domínio
- devops, infrastructure
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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?
- Linguagem predominante
- Shell
- Estrelas
- 1.6k
- Forks
- 627
- Merge médio
- 2d 15h
- PRs com merge (30d)
- 5
Preparar o ambiente
Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de devcontainers/features
-
Terraform feature fails to install due to tflint checksumTalvez já em andamento @v-Kaniska244 assumiu há 7 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
devcontainers/features#1757 · 1 comentário · 1 reação · 2 responsáveis ·
-
fjvviufhbhdgvhvgf chjAberta
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 1/100
devcontainers/features#1767 ·
-
ix, , l ,vpmvn kjvbbi nvkvnjAberta
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 1/100
devcontainers/features#1766 ·
-
python: signature verification can never succeed for Python 3.14+Talvez já em andamento @V-Subhankar-infy assumiu há 1 dia. Aberta
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 52/100
devcontainers/features#1764 · 1 comentário · 1 responsável ·
-
docker-outside-of-docker: processes started before the entrypoint's `groupmod` keep stale groups and cannot use the socketTalvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Aberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 18/100
devcontainers/features#1760 ·
Todas as issues de devcontainers/features
Issues semelhantes
-
enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 61/100
JWhite212/SignalLadder#215 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
richardcase/skills#29 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
openziti/helm-charts#427 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 77/100
Eyevinn/php-runner#24 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia