4 ms·
Docker-in-Docker (DinD) doesn't piggy back on the host's Docker daemon, but instead runs a stripped-down Docker daemon inside of the container. The major downsi
by kinghajj 6y ago
Docker-in-Docker (DinD) doesn't piggy back on the host's Docker daemon, but instead runs a stripped-down Docker daemon inside of the container. The major downside is that I/O is quite slow, since you're going through two virtualization layers (the DinD one, plus the host Docker daemon).
- eblanshey 6y agoWill mounting the socket, as the person I replied to suggested, make it use the host's docker daemon?
- pbalau 6y agoYes, that's the point.
- cpuguy83 6y agoThis is not true. There is, effectively, no "virtualization" layer here. There are some things that if needed can cause overhead... such as the bridge networking (really shouldn't be a bottleneck for majority of people), and the CoW filesystem... which docker won't be (or shouldn't be) running on top of since, for example, overlayfs on top of overlayfs is not supported. There is also nothing stripped down about the daemon inside of the container.
- kinghajj 6y agoSure, I was speaking off the cuff based on my experience from a few years ago. Maybe I messed up and somehow had the DinD daemon not use a volume mount, and that's what caused it to build images slowly?
- cpuguy83 6y agoVery well could be since it would have to fallback to the naive graphdriver that just copies stuff around.