If docker uses the underlying linux os, why specify the OS in the FROM line of a Dockerfile -
i've read on linux, docker uses underlying linux kernal create containers. advantage because resources aren't wasted on creating virtual machines each contain os.
i'm confused, though, why dockerfiles specify os in line of dockerfile. thought using underlying os, os wouldn't have defined.
i know happens if os specified doesn't match os flavour of machine it's running on. if machine centos dockerfile has from debian:latest
in first line, virtual machine containing debian os created.
in other words, result in performance reduction because needs create virtual machine containing specified os?
i'm confused, though, why dockerfiles specify os in line of dockerfile. thought using underlying os, os wouldn't have defined.
i think terminology may little confused.
docker indeed uses host kernel, because docker nothing way of isolating processes running on host (that is, it's not sort of virtualization, , can't run different operating system).
however, filesystem visible inside container has nothing host. docker container can run programs linux distribution. if on fedora 24 host, can build container uses ubuntu 14.04 userspace starting dockerfile with:
from ubuntu:14.04
processes running in container still running on host kernel, there entire userspace comes ubuntu distribution. isn't "operating system" -- it's still same linux kernel -- separate filesystem.
the fact host running different kernel version maybe find in actual ubuntu 14.04 host almost irrelevant. there going few utilities expect particular kernel version, applications don't care long kernel "recent enough".
so no, there no virtualization in docker. various (processes, filesystem, networking, etc) sorts of isolation.
Comments
Post a Comment