3 ms·
A container is not a process. It’s an execution environment created by namespaces (mount, pid, network, others) and cgroups. A container can house many proces
by pushedx 4y ago
A container is not a process.
It’s an execution environment created by namespaces (mount, pid, network, others) and cgroups.
A container can house many processes.
- liquidgecka 4y ago^-- this! Also, a container can house a container.. kind of. If you think of containers like file system inodes then there is a logical view of containers container1: (init -> dockerd) -> container2: (init -> dockerd) -> container3: (init -> dockerd) -> container4: (process) is perfectly feasible and from our view there is a hierarchy of containers, but in reality it would be possible assign a process in container4 to container1 and create all kinds of cool logical loops. This is effectively what a daemonset is in kubernetes. =)
- lstodd 4y agoIn reality there is no such thing as a 'container'. You can create an incredible self-intersecting mess of process namespaces. It is not what you want to do in production. Also, docker is an overengineered mess. Kubernetes only an couple of orders of magnitude more so.
- G3rn0ti 4y agoOn Windows and Macs Docker uses VMs ... I think the DEV community really needs a new definition of "containers" and one that is not backed by implementation details of Docker Linux.