devcontainers / devcontainers/features
[Docker-in-Docker] Missing option to restart docker from inside the devcontainer
- Dominant language
- Shell
- Stars
- 1.5k
- Forks
- 621
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 4
Description
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 ;)
Contributor guide
Assessment
This issue has not been assessed yet.