So, the other day I was reading about OS/System Container vs Application Container here.
There it is mentioned that Docker is an application container and
Any container that runs an OS is a system container.
Now, I am confused because even to run applications in Docker you need to have a base image which could any distro. So, shouldn't this make Docker also an OS Container technology? Could anyone list out the differences between OS vs Application Container technology?
So in general when you want to package and distribute your application as components, application containers serve as a good resort. Whereas, if you just want an operating system in which you can install different libraries, languages, databases, etc., OS containers are better suited.
What's an Application Container? An application container is a stand-alone, all-in-one package for a software application. Containers include the application binaries, plus the software dependencies and the hardware requirements needed to run, all wrapped up into an independent, self-contained unit.
Docker is an open source software platform to create, deploy and manage virtualized application containers on a common operating system (OS), with an ecosystem of allied tools. Docker container technology debuted in 2013; Docker Inc.
Docker does not has an OS in its containers. In simple terms, a docker container image just has a kind of filesystem snapshot of the linux-image the container image is dependent on.
As @csprabala so helpfully pointed in his linked answered thread:
OS Container (or System containers) and Application Container are both first and foremost containers, and that means they operate in a similar fashion by sharing the kernel and including everything they need in their "container image" respectively.
The difference mainly comes when OS containers will almost exclusively use the guest OS kernel directly using their own kernel API function (described here) like a VM would, but unlike a VM - which usually runs above a hypervisor (like Oracle VirtualBox or VMWare ESXi) and has hard disks represented as .vmdk
files, System containers run just like any other container on the host OS as a segregated set of processes.
On the contrary, Application containers that use Docker, cri-o or contained (all linked here) still rely on some sort of underlying container engine to serve as the medium to the guest os and run as regular processes on it (unless of different architecture then emulation is used) and that's why if you'd run docker as a service on a Linux distro and lets say a Java application on top of it and you'd check running processes with top
you'd see the java process running directly on the Host OS but of course separated with namespaces, PID trees (or Process Trees) and cgroups.
the implementation has some resemblance but is quite different in usage and low level works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With