Types of Container

What is a container?

  • A container may be a run-time instance of a picturea picture is an executable package that has everything needed to run an application.
  • the code
  • a run time
  • Libraries
  • environment variables
  • and confirmation files

Making a container using an image for any application is named containerization. Docker is widely wont to containerize our application.


  • Containerization is increasingly popular because containers are;
  • Flexible (Even the foremost complex applications are often containerized)
  • Lightweight (Containers leverage and share the host kernel)
  • Interchangeable( we will deploy updates and upgrades on the fly)
  • Portable(We can build locally, deploy to the cloud, and run anywhere).
  • Scaleable (We can increase and automatically distribute container replicas)
  • Stackable ( we will stack services vertically and on the fly).
  • Container technology is also referred to as just a container, maybe a method to package an application so it is often run, with its dependencies, isolated from other processes.
  • For an extended time, large web-scale players like Google are using container technologies to deal with these shortcomings of the VM model.
  • In the container model, the container is roughly analogous to the VM. the main difference though, is that each container doesn’t require a full-blown OS.
  • In fact, all containers on one host share one OS. This frees up huge amounts of system resources like CPU, RAM, and storage. It also reduces potential licensing costs and reduces the overhead of OS patching and other maintenance. This leads to savings on the cap-ex and op-ex fronts.

Containers also are fast to start out and ultra-portable. Moving container workloads from your laptop, to the cloud, then to VMs or bare metal in your data center may be a breeze.

Major difference between containers and VM model

Single OS: All containers on one host share one OS

Less hardware resources: This frees up huge amount of system resources like CPU,RAM, and storage.

Types of Container

Linux container

Containers technology isn’t a replacement phenomenon, and long has been a core for Linux. The advance in recent years of container technology it’s become easier to use, and software developers have embraced them for his or her simplicity, and avoiding compatibility problems.

They also enable a program to be weakened into smaller pieces, which are referred to as micro services. even as one example, Google inc. has contributed many container-related technologies to the Linux Kernel.

Google isn’t alone, many individual developers and corporations have contributed to Linux kernel. Without these contributions, we wouldn’t have modern container today.

Windows containers

Over the past few years, Microsoft Corp. has worked extremely hard to bring Docker and container technologies to the windows platform.The core windows technologies required to implement containers are collectively mentioned as Windows containers.

           The user-space tooling to figure with these windows containers is Docker. This makes the Docker experience on Windows almost precisely the same as Docker in Linux. In this manner developers and sysadmins conversant in the Docker- tools from the Linux platform will feel reception using windows container.

Important to note:

            It’s vital to know that a running container uses the kernel of the host machine it’s running on.
            This means that a container designed to run on a number with a Windows kernel won’t run on a Linux host.
            This means that you simply can consider it like this at a high level-Windows container require a Windows host.
            However, it’s possible to run Linux containers on windows machines. for instance, Docker for windows ( a product offering from Docker Inc, designed for windows 10) can switch modes between Windows containers and Linux containers.

Container Images

  • A container image may be a lightweight, stand-alone, executable package of software that has everything needed to run an application:
  • Code 
  • Run time 
  • System Tools 
  • System libraries 
  • Settings
  • Images become containers once they run on Docker Engine. 
  • Images are made from multiple layers that get stacked on top of every other and represented as one object. 
  • inside the image may be a cut-down operating system(OS) and every one of the files and dependencies required to run an application. 
  • during this way, each layer contains various things required to run a containerized app. 
  • Common layers among different images are downloaded on just one occasion and are stored on just one occasion and obtain re-use altogether images. 
  • You build container-supported images which are why images are sometimes called stopped containers. 
  • You’ll also create images from actually stopped containers. 
  • Once a container is up and running made up of a picture, the 2 constructs become hooked into one another and you can’t delete the image until the last container using it’s been stopped and destroyed. The whole purpose of the container is to run an application. 
  • However, containers are about to be fast and lightweight weight. This means that the pictures they’re built from are usually small and stripped of all non-essential parts. 
  • The official Alpine Linux Docker image is about 4MB in size and is an extreme example of how small Docker images are often. Official Ubuntu Docker image which is currently about 120MB. These are clearly stripped of most non-essential parts.

Mansoor Ahmed

Mansoor Ahmed is Chemical Engineer, web developer, a Tech writer currently living in Pakistan. My interests range from technology to web development. I am also interested in programming, writing, and reading.