In last section we had a long discussion about the relationship between a container and an image.
We had said that a container is a running process along with a subset of physical resources on your
computer that are allocated to that process specifically.
We also spoke a little bit about the relationship between an image and a running container.
Remember an image is really kind of a snapshot of the file system along with a very specific start up
command as well.
Now one thing that I want to mention very quickly here in the last section that we spoke a little bit
about the separation or the kind the isolation of these resources through a technique called name spacing.
And we also said that we could limit the amount of resources used by these control group things as well.
NOW THIS FEATURE OF NAME spacing and control groups is not included by default with all operating systems
even though in the last section I had kind of specifically said like oh yeah your operating system has
a kernel to these features of named spacing and control groups are specific to the Linux operating system.
So name spacing control groups belong to Linux not to Windows not to Mac OS.
So that might make you kind of question or wonder how are you running Docker right now.
You know we are running a docker client and we are running docker containers on a Mac OS or Windows
operating system.
How is that happening if these are Linux specific features.
Well here's what's happening behind the scenes.
When you installed Docker for Windows or Docker for Mac just a moment ago in the last couple of sections
you installed a Linux virtual machine so so long as Docker up here is running you technically have a
linux virtual machine running on your computer inside of this virtual machine is where all these containers
are going to be created.
So inside the virtual machine we have a Linux kernel and that Linux kernel is going to be hosting running
processes inside of containers and it's that Linux kernel that's going to be in charge of limiting access
or kind of constraining access or isolating access to different hardware resources on your computer.
You can actually kind of see this Linux virtual machine in practice by opening up your terminal right
now.
And if you run that darker version command again and look at your server you'll notice that there's
actually an OS entry on here and you'll notice that it probably doesn't have your operating system listed.
Mine for example right here says very specifically Linux as the operating system.
So that is kind of specifying that I'm running a Linux virtual machine and that's what's being used
to host all these different containers that you and I are going to be working with.
So just a little bit of interesting trivia.
Now let's take another quick break right here.
We're going to continue the next section and start digging into the darker client a little bit more.
So a quick break.
I'll see you in just a minute.