3 ms·
Can someone explain to me - are containers based on a base OS, or are they capable of running on any OS? I see the 'run anywhere' taglines and it just doesn't m
by jsmeaton 13y ago
Can someone explain to me - are containers based on a base OS, or are they capable of running on any OS? I see the 'run anywhere' taglines and it just doesn't make sense to me.
I imagine that docker containers have to be provisioned in some way, and if you're provisioning with `apt-get` then it's not going to work when deploying to a redhat OS.
Essentially, I understand Docker containers to be lightweight virtual machines rather than applications that can be deployed to anything running the docker service. Am I on the right track?
- leccine 13y agoIt is not a virtual machine, it is just a separated process space that looks like a VM though. http://en.wikipedia.org/wiki/LXC http://en.wikipedia.org/wiki/LXC
- ecnahc515 13y agoContainers, not VMs. Containers contain processes, and Docker base images allow you to use yum/dpkg/apt in various containers, it doesn't matter what host OS you use, as long as you run a supported Linux Kernel.
- robszumski 13y agoAs long as the userland is supported by your kernel, you can run it within a container on that host. You build your custom containers off of a base container that has the initial userland in it already. This is normally the first line in a Dockerfile: `FROM busybox` or `FROM ubuntu:latest`
- jsmeaton 13y agoThank you, that makes a lot of sense and finally clears it up for me.