go feature: "init:true" prevents any further use cases that require "init:false", such as running systemd as PID1
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 55/100
- Issue-Typ
- Feature
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Bereich
- devops, infrastructure
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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?
- Vorherrschende Sprache
- Shell
- Sterne
- 1.6k
- Forks
- 627
- Ø Merge
- 1 T. 19 Std.
- Gemergte PRs (30 T.)
- 5
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus devcontainers/features
-
Terraform feature fails to install due to tflint checksumEvtl. vergeben @v-Kaniska244 hat das vor 6 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
devcontainers/features#1757 · 1 Kommentar · 1 Reaktion · 2 zugewiesene Personen ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 52/100
devcontainers/features#1764 ·
Maintainer antworten meist innerhalb von 1 Tag
-
docker-outside-of-docker: processes started before the entrypoint's `groupmod` keep stale groups and cannot use the socketEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 18/100
devcontainers/features#1760 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 38/100
devcontainers/features#1754 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
devcontainers/features#1730 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in devcontainers/features
Ähnliche Issues
-
area:docs phase:release priority:p0 type:test
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
-
Non-root first start logs "Base venv updated (stamp mismatch)" instead of the first-run messageOffenarea: infrastructure bug priority: low
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
snapotter-hq/SnapOtter#4573 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 67/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
eip-work/kuboard-press#700 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 67/100
fullsend-ai/agents#1901 ·
Maintainer antworten meist innerhalb von 1 Tag