devcontainers / devcontainers/features

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

Ouverte
#671 7 commentaires 5 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Shell
Étoiles
1.5k
Forks
621
Merge moyen
6 j 53 min
PR mergées (30 j)
9

Description

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

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par lire /usr/local/share/docker-init.sh et la configuration de l’entrypoint de la docker-in-docker Feature, puis examinez la demande de spécification bloquée dans devcontainers/spec#299 et les modifications de nouvelle tentative de la pull request #669. Le travail est terminé lorsque la Feature est mise à jour pour utiliser la nouvelle sémantique blocking-entrypoint afin que les commandes de cycle de vie attendent que dockerd soit disponible.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
docker, shell
Domaine
devops, infrastructure
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.