devcontainers / devcontainers/features

[docker-in-docker] - Use blocking entrypoints to ensure dockerd startup

Offen
#671 7 Kommentare 5 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Shell
Sterne
1.5k
Forks
621
Ø Merge
6 T. 53 Min.
Gemergte PRs (30 T.)
9

Beschreibung

We have seen flakiness in docker startups for `docker-in-docker` Feature where docker is not running in the container. See https://github.com/devcontainers/features/issues/634 and https://github.com/devcontainers/features/issues/660.

https://github.com/devcontainers/features/pull/669 adds few retry mechanisms to attempt to fix this issue.

`/usr/local/share/docker-init.sh` which starts/retries dockerd is added to the `entrypoint` property for the Feature. This command runs in the background and is not a blocking script for the container startup. Since it's in the background, `onCreateCommand/postCreateCommand/postStartCommand` could all start executing before docker is fully running. If it takes docker too long, that could introduce flakiness in those lifecycle scripts.

Opened https://github.com/devcontainers/spec/issues/299 which requests a new semantics to have "blocking" entrypoints that the CLI waits for. This way we can ensure that docker is already up and running for the mentioned ^ lifecycle scripts and is 💯 available in the container.

This issue tracks updates to dnd Feature, when blocking entrypoint is available.

Blocked by -
- https://github.com/devcontainers/spec/issues/299

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.