On Linux, I know that all docker containers share Host operation system Kernel. As far as I know, In OS there is software layer above Kernel, so I think that containers, that share Kernel, don't pay any attention to Host OS software layer. So I came to conclusion that containers have their own OS software inside (Maybe Debian, Ubuntu, Fedora and others). Is that true? If this is true, than how this containers can be as small as 5 MB?
Asked
Active
Viewed 46 times
-1
-
3Possible duplicate of [What is the relationship between the docker host OS and the container base image OS?](https://stackoverflow.com/questions/18786209/what-is-the-relationship-between-the-docker-host-os-and-the-container-base-image) – David Maze May 09 '19 at 13:41
1 Answers
1
Some distributions (e.g. Alpine Linux) used in containers are indeed minimal, and they don't provide any tool that you would need in you everyday OS (no gunzip, no editors etc). In addition to this, as you said, they don't need the kernel side and will rely on a working OS (reducing the footprint).

Andrea T.
- 920
- 4
- 15
-
1Every container is derived FROM a base image. That could be an OS, it could also be another image (which might be based of an OS-base image). However, there's also something called a Scratch base image, which contains nothing, for extremely minimal images. See https://docs.docker.com/samples/library/scratch/ – Frank Louwers May 09 '19 at 15:42