devcontainers / devcontainers/features
[Docker-in-Docker] Missing option to restart docker from inside the devcontainer
- Lenguaje dominante
- Shell
- Estrellas
- 1.5k
- Forks
- 621
- Merge medio
- 6 d 53 min
- PR fusionados (30 d)
- 9
Descripción
Using default devcontainer setup:
"name": "Docker in Docker",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/base:bullseye",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"version": "latest",
"enableNonRootDocker": "true",
"moby": "true"
}
}
The problem I experienced is, when I have changed my MTU on my host docker to e.g. 1332 I get connection disconnects inside the containers in my devcontainer environment. This is due to mismachting MTU values. Resetting my MTU on my host to 1500 resolves this problem.
So far this is no problem. Adjusting the MTUs accordingly should solve my issues, but I have to restart the docker daemon inside the devcontainer for that. Trying `systemctl restart docker` yields following message:
> "systemd" is not running in this container due to its overhead.
> Use the "service" command to start services instead. e.g.:
>
> service --status-all
Executing `service --status-all` yields:
> [ ? ] hwclock.sh
> [ - ] procps
> [ - ] rsync
> [ - ] sudo
It's also necesscary to be able to enable IPv6 for Docker ;)
Guía de contribución
Línea de trabajo
Comienza con la feature ghcr.io/devcontainers/features/docker-in-docker:2 y reproduce la configuración predeterminada usando las opciones mostradas. Comprueba cómo se inicia Docker dentro del devcontainer en lugar de depender de systemctl y, después, verifica que la ruta de reinicio solicitada y la compatibilidad con IPv6 funcionan tras cambiar la MTU del host.
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
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 30/100