4 ms·
- Containers still do have an whole POSIX-ly userland with shell and coreutils. You can extract every container onto an disk and make an static linux kern
by alyandon 9y ago
- Containers still do have an whole POSIX-ly userland with shell and coreutils.
You can extract every container onto an disk and make an static linux kernel boot it.
What's in a docker image is entirely up to the image creator. Docker containers don't necessarily have to use a complete userland + init system as a base.
- blueflow 9y agoIn practice, containers do have a shell, since a few things (Dockerfile RUN & CMD in non-exec mode, environment variable substitution, docker exec shell) dont work without it.
- webster23 9y agoBut you don't have to have all that, you can have just a single executable in the container, like here for example: https://github.com/containous/traefik-library-image/blob/f24cd6a1a31933c76ab397868b5da84d43f5d2ff/scratch/amd64/Dockerfile https://github.com/containous/traefik-library-image/blob/f24...