devcontainers / devcontainers/features

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

Abierto
#671 7 comentarios 5 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Shell
Estrellas
1.5k
Forks
621
Merge medio
6 d 53 min
PR fusionados (30 d)
9

Descripción

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

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza leyendo /usr/local/share/docker-init.sh y la configuración del entrypoint de la docker-in-docker Feature; después, revisa la solicitud de especificación bloqueada en devcontainers/spec#299 y los cambios de reintento en el pull request #669. Se considera terminado cuando se actualice la Feature para usar la nueva semántica de blocking-entrypoint, de modo que los comandos de ciclo de vida esperen hasta que dockerd esté disponible.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
docker, shell
Área
devops, infrastructure
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.