Dockers and Containers

Dockers and Containers

·

3 min read

Introduction

It is day 2 of documenting my DevOps learning journey .

This blog is a short introduction or can say ,Pre-requisite before starting Docker.

Recap

A small recap from yesterday's blog .

A DevOps engineer handles, manages ,deploys the entire project , instead of focusing on one frontend/backend/etc.

Containers run the services in an isolated environment and it runs irrespective of dependencies and compatibility since containers has everything that requires for the application to run.

Docker creates image which is a template like structure where everything that is required to run the project can be found . This docker image can be pushed online , sent to people etc.

Running a docker image , results in a running container , in short docker container is a running instance of the docker image. But , with a single image , many containers can be run .

https://images.unsplash.com/photo-1634646809203-f3b4adff9127?ixlib=rb-1.2.1&q=85&fm=jpg&crop=entropy&cs=srgb

Linux Containers and windows containers :

There are two kinds of containers .

  1. Linux based and
  2. Windows based containers.

They have their own perks and cons ,but here I am writing about Linux containers.

One can run Linux based docker on a windows machine through Linux VM as well as Docker desktop which does all the work for you to getting started in using Linux containers on a windows machine.

A lot of images can be found on DockerHub , Amazon Elastic Container Registry , Google container registry , etc.

The images can be stored in public , where anybody can access it, as well as private , where only you can access/control it.

There are a tons of applications which started releasing their product in a docker image format which can solve version upgrade , update problems as well .

Alpine images are very much lighter compared to all other Linux containers and can have your whole application on MBs rather than GBs , I will be using Alpine for most of the images here.

https://images.unsplash.com/photo-1629654297299-c8506221ca97?ixlib=rb-1.2.1&q=85&fm=jpg&crop=entropy&cs=srgb

Answering to Yesterday’s blog🤔

An application should be able to keep up and running in spite of how much ever big the traffic is . When the traffic gets huge , there are chances for the app to be down and this is where the scalability of containers comes to place. Containers as they are isolated and independent , we can also take advantage by using them to scale up or down depending upon the need by simply creating more instances of the container .

A container can have frontend-backend-database everything on it , also as they are independent, we can have the container set up according to our need .

For example,

If frontend is getting overloaded , we can create a container with only front-end on it , and enable the other two only when it is required.

This way even if one container goes down , the other containers can manage it.

Docker installation

Docker can be installed on the following link ,

Docker Desktop for Mac and Windows | Docker

Okay . So hold on, stay with me as we get to know docker more and DevOps even more.

Okay Then , Will get back Tomorrow with more!

Peace be upon you!

Did you find this article valuable?

Support Shajith by becoming a sponsor. Any amount is appreciated!