devcontainers / devcontainers/features
[docker-in-docker] - Use blocking entrypoints to ensure dockerd startup
- Lingua principale
- Shell
- Stelle
- 1.5k
- Fork
- 621
- Merge medio
- 2g 11h
- PR unite (30g)
- 4
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.