Let us look at Docker: Part-I

PATIL PRASAD
4 min readAug 5, 2023

--

In this blog series on docker, we will cover docker from scratch

Table of contents :

1. Past scenario
2. What is a Container?
3. Where do containers live?
4. Containers Vs Virtual Machines
5. Introduction to docker
6. Why would you need to use docker?
7. Installation
8. Architecture
9. Basic terminologies

Past Scenario

Lets us dial back the clock, back when computers were a novelty, and companies wanted to run their application, they would have to get a server to do so. Upon acquiring the server, only a single application was executed on one server at a time.

Now suppose you want to scale your application then you have to set up another server to manage the load this way you need to set up no of servers to manage the increasing load

who solved this problem? — IBM fixed this issue by introducing the concept of virtual machines into the game

virtual machines solve this one application one server problem ………… With virtual machines, we could run multiple applications on the same server by dual booting; like installing Linux on your Windows device. These are virtual machines

However, they had a problem as well. They require their own operating system, which tended to take up a lot of memory and storage on your disk space so it was time-consuming. Although it is a far better solution than traditional architecture still not perfect.

In came containers:

What is Container:

Suppose you are moving to a new apartment, you will pack your things in a box rather than shipping them one by one right?

So this box in simple terms is a container.

suppose you built one website and you shared it with your friend & your friend says it's not working on my machine then these famous phrase comes but it works fine on my machine ………

to avoid such, you can use a container, which would ship the entire website along with its dependencies, such as database, frontend, backend, all source code …all stuff that requires to run a website. This would ensure that the website runs smoothly.

In computing terms ,containerization is an efficient method for running ,deploying and scaling applications

What is containerization?

Containerization is a software deployment process that bundles an application’s code with all the files and libraries it needs to run on any infrastructure. Traditionally, to run any application on your computer, you had to install the version that matched your machine’s operating system. For example, you needed to install the Windows version of a software package on a Windows machine. However, with containerization, you can create a single software package, or container, that runs on all types of devices and operating systems.

Where do Containers live?

  • Container Repository — A container repository is a group of connected container images that are used to provide various applications.
  • Private Repository — Private repositories let you keep container images private, either to your own account or within an organization or team.
  • Public Repository — Public repositories can be used to host Docker images which can be used by everyone else. Example-Docker Hub

Developers and Operations work together to package the application in a container.

Containers Vs Virtual Machines:

  • VM provides complete isolation from the host operating system and other VMs.
  • A container provides lightweight isolation from the host and other containers but doesn’t provide as strong a security boundary as a VM.
  • VM runs a complete operating system including the kernel, thus requiring more system resources.
  • A container runs an operating system’s user mode and can be configured to only run the services that your app actually needs, consuming fewer system resources.
  • VM runs just about any operating system inside the virtual machine.
  • A container runs on the same operating system version as the host.

Introduction to docker:

Docker is one among many containers platforms that allows you to build such containers to test, build and scale applications rapidly and easily by running them in isolated environments

  • Docker is an open platform for developing, shipping and running applications.
  • You may separate your applications from your infrastructure with the help of Docker, which allows for quick software delivery.
  • You can manage your infrastructure using Docker in the same manner that you manage your applications.

Docker is written in the Go programming language and takes advantage of several features of the Linux kernel to deliver its functionality.

Why would you need to use docker?

  • Fast, consistent delivery of your applications.
  • Responsive deployment and scaling.
  • Running more workloads on the same hardware.

Installation

  • Install Docker Desktop on Mac Here.
  • Install Docker Desktop on Windows Here.
  • Install Docker Desktop on Linux Here.

Now let's see Architecture in part -II ……….

--

--