Iran to Remove Four Zeros from National Currency

The plan will be proposed to the Parliament as a double-urgent motion, the government spokesman Ali Rabiei said. The CBI says its governor, Abdolnasser Hemmati, has already made it clear for the…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Under the hood Docker

Virtualization

The virtualization method can be categorised based on how it mimics hardware to a guest operating system and emulates guest operating environment. There are 3 types of virtualization.

Emulation : Emulation, also known as full virtualization runs the virtual machine OS kernel entirely in software. The hypervisor used in this type is known as Type 2 hypervisor. It is installed on the top of host operating system which is responsible for translating guest OS kernel code to software instructions. The downside of this type of virtualization is additional system resource overhead that leads to decrease in performance compared to other types of virtualizations.

Examples in this category include VMware Player, VirtualBox, QEMU, Bochs, Parallels, etc.

Paravirtualization : Paravirtualization, also known as Type 1 hypervisor, runs directly on the hardware, or “bare-metal”, and provides virtualization services directly to the virtual machines running on it. It helps the operating system, the virtualized hardware, and the real hardware to collaborate to achieve optimal performance. These hypervisors typically have a rather small footprint and do not, themselves, require extensive resources

Examples in this category include Xen, KVM, etc.

Container-based virtualization :Container-based virtualization, also know as operating system-level virtualization, enables multiple isolated executions within a single operating system kernel. It has the best possible performance and density and features dynamic resource management. The isolated virtual execution environment provided by this type of virtualization is called container and can be viewed as a traced group of processes.

Examples in this category include LXC,libcontainer

Why Containers ?

1 Unlike a virtual machine, a container does not need to boot the operating system kernel, so containers can be created in less than a second.

2 Since container-based virtualization adds little or no overhead to the host machine, container-based virtualization has near-native performance

3 All containers on a host machine share the scheduler of the host machine saving need of extra resources.

4 Container states (Docker or LXC images) are small in size compared to virtual machine images, so container images are easy to distribute.

And many more

Companies use Docker to run and manage apps side-by-side in isolated containers to get better compute density.

docker is lightweight and uses LXC/libcontainer ( They start with LXC and latter they develope their own container runtime libcontainer ) and does not have machine/hardware emulation such as hypervisor, KVM and Xen which are heavy. Lets go deeper

Docker start:

Let’s check what is docker image.

You got some hash dir they are layers. They follow tree structure to form that environment.

Let’s do some crazyiyapa

#now you are inside docker container

#do some installation.you can create your environment and exit from container and check container id by docker ps

# check docker images you found your image name

#check hashes count before installation in test folder and after installation. You found different number. In installation you just create some node in the tree in form of hash. That’s docker images.We can reuse these layers they store in cache.

Now talk about containers. Container is a process controlled by cgroups and namespace.

What is cgroups and namespace ?

They help to controlle a process in terms of storage,network,cpus etc. They are responsible to manage process in your os. When we create a container meaning we create a process who has its own world and controlled by cgroups and namespace.

So what the fuck docker do ?

docker is just a run time who help us to manage things easily.

What is docker file ?

We just create our docker image by container commit. It’s a manual process on production we can’t do manual things.

Docker file is the solution. It also help us to create same environment on any system but how it work?

Docker provide some command (API) like FROM,ADD,RUN,COPY, etc

They tell docker client to exec some instructions. For example

By using that file you can setup your environment in any system. On production it help us a lot.

Docker world is a bidirectional

container <-> image <- Docker File

When you install docker you got a docker host and client.

What is Kuberneres ?

Kubernetes is an open source container orchestration framework built by teams at Google and bases its container-worldview on how Google develops within their walls in Mountain View.

Kubernetes vs docker ??

Above part about docker only help us to work on single node. But on production we use cluster. Cluster size depends upon situation traffic.

And by the way comparing Kubernete vs Docker really comes down to comparing Kubernetes to Docker’s Swarm product

Docker Swarm (Next Post)

Add a comment

Related posts:

Pastor Says Not Getting Vaccinated is a Form of Abuse

My best friend recently shared an email from her church pastor regarding COVID-19 and vaccination. It started with the words: “Safe Ministry isn’t just about child abuse; it’s about protecting…

Honeymoon Kidnapping

We were headed back to the cruise ship, after a long day of walking around the island of St. Thomas. We just finished touring and shopping when we found ourselves standing in a parking lot being…

Why and How Should We Visit The Killing Fields

As horrifying as the name implies, The Killing Fields in Cambodia, including both Choeung Ek Genocidal Center, Tuol Sleng Museum and 20,000 mass grave sites, keep the most painful memories of…