Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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?



As 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`


Thank you, that makes a lot of sense and finally clears it up for me.


Containers, 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.


It is not a virtual machine, it is just a separated process space that looks like a VM though.

http://en.wikipedia.org/wiki/LXC




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: