Day-23 | Introduction to Containers | Learn about containers in easy way #docker #kubernetes #devops

Abhishek.Veeramalla
7 Feb 202325:10

Summary

TLDRIn this 23rd installment of the DevOps course, Abhishek introduces the concept of containers, emphasizing their efficiency over virtual machines by sharing resources and being lightweight. He discusses Docker's role in containerization, the Docker engine's limitations, and introduces Builder as an alternative tool. The video is aimed at providing foundational knowledge before delving into more complex topics such as creating projects and using modern tools like Scorpio and podman.

Takeaways

  • 📢 Abhishek introduces a new Telegram group for sharing resources, which is an alternative to YouTube Community posts where information can be easily overlooked.
  • 🚀 Day 23 of the DevOps course focuses on the fundamentals of containers, emphasizing the importance of understanding the basics before moving on to more complex topics.
  • 🌐 The script provides an overview of virtual machines as a precursor to understanding containers, suggesting that those unfamiliar with VMs should review Day 3 of the course.
  • 💡 Virtualization is presented as a solution to underutilized resources on physical servers, allowing for the creation of multiple virtual machines to better utilize CPU, RAM, and hardware resources.
  • 🔧 The concept of a hypervisor is introduced as a technology that enables virtualization, creating a virtual environment for each application to run securely on the same physical server.
  • 📈 The script discusses the inefficiency of virtual machines, which often do not use their allocated resources to full capacity, leading to wasted resources and costs.
  • 🔑 Containers are introduced as an advancement over virtual machines, designed to be more resource-efficient and reduce the problem of underutilized resources.
  • 🛠️ The architecture of containers is explained, showing that they can be created on top of both physical servers and virtual machines, and how they differ from traditional VMs.
  • 🔑 Docker is highlighted as a popular containerization platform that has simplified the creation and management of containers through its user-friendly commands and Dockerfiles.
  • 📦 Containers are described as lightweight because they do not have a full operating system and instead share resources from the host OS, leading to smaller image sizes and easier portability.
  • 👷‍♂️ The script mentions Builder as an alternative to Docker, aiming to solve issues like single point of failure and layering complexity, and is positioned as a tool to watch for in the DevOps field.

Q & A

  • What is the main topic of the video script?

    -The main topic of the video script is an introduction to the world of containers, particularly Docker, in the context of a DevOps course.

  • Why did the instructor create a Telegram group for the channel?

    -The instructor created a Telegram group to share important resources more effectively, as they found that information shared on YouTube Community posts can be easily overlooked or difficult to scroll back to.

  • What is the significance of understanding virtual machines before learning about containers?

    -Understanding virtual machines is important because it provides a foundation for understanding containerization. Containers are considered an advancement over virtual machines, and knowing virtual machines helps in grasping the concept of containers more effectively.

  • What is the purpose of a hypervisor in the context of virtualization?

    -A hypervisor is used to create multiple virtual machines or virtual servers on top of a physical server. It allows for better utilization of resources by enabling the logical separation of resources for each virtual machine.

  • What problem does containerization aim to solve that virtualization does not address as efficiently?

    -Containerization aims to solve the problem of underutilization of resources within virtual machines. While virtual machines are good at isolating applications, they often do not use their allocated resources to their full capacity, leading to inefficiencies.

  • What is the difference between a virtual machine and a container in terms of resource usage?

    -A virtual machine has a complete operating system and uses more resources, including memory and CPU, for isolation. A container, on the other hand, shares the host's operating system and only requires the application and its dependencies, making it lighter and more resource-efficient.

  • What is a Dockerfile and why is it important in the context of Docker containers?

    -A Dockerfile is a script containing instructions to build a Docker image. It is important because it defines the environment in which the application runs, including the application itself, its dependencies, and any system dependencies.

  • What is the lifecycle of a Docker container according to the script?

    -The lifecycle of a Docker container starts with writing a Dockerfile, then building the Docker image using the Dockerfile, and finally running the container from the image using Docker commands.

  • What is the role of Docker Engine in managing Docker containers?

    -Docker Engine is responsible for executing Docker commands to build images from Dockerfiles and to create and manage containers from those images. It acts as a platform that facilitates the creation and operation of Docker containers.

  • What is the significance of the term 'single point of failure' in the context of Docker Engine?

    -The term 'single point of failure' refers to the risk that if the Docker Engine goes down, all Docker containers relying on it will also stop working. This is a significant drawback because it can lead to service disruptions.

  • What is Builder and how does it differ from Docker in terms of solving certain challenges?

    -Builder is a tool that aims to address some of the challenges associated with Docker, such as the single point of failure and the problem of multiple layers in Docker images. Builder allows for creating images without the need for a Dockerfile, using shell scripts with Builder commands, and it is designed to work well with modern tools like Scorpio and Podman.

Outlines

00:00

📚 Introduction to Containers and Docker

In this segment, Abhishek introduces the topic of containers as part of a DevOps course, highlighting the importance of understanding the basics before delving into more complex concepts. He announces the creation of a Telegram group for sharing valuable resources and encourages subscribers to join for easy access to these materials. The paragraph emphasizes the necessity of comprehending containers, which are an advancement over virtual machines, and mentions Docker, a popular tool in the DevOps space. It sets the stage for a foundational understanding of containerization and its significance in modern development practices.

05:00

🚀 Transition from Virtual Machines to Containers

This paragraph delves into the reasons for moving from virtual machines to containerization. It explains the inefficiency of resource utilization in virtual machines and how containers offer a solution to this problem by making better use of resources. The speaker uses the analogy of physical servers, hypervisors, and virtual machines to illustrate the concept of virtualization and its limitations. The introduction of containers is positioned as a response to the need for more efficient resource management, leading to cost savings and better performance in large-scale deployments like those found in cloud services.

10:03

🏗️ Container Architecture and Creation Methods

The speaker discusses the architecture of containers, explaining that they can be created on top of both physical servers and virtual machines. Two models are presented: one where containers are built directly on physical servers, and another where they are layered on virtual machines. The paragraph highlights the shift towards the second model due to reduced maintenance overhead and the prevalence of cloud computing. It also touches on the lightweight nature of containers, which is attributed to their lack of a full operating system and their use of shared resources from the host environment.

15:04

🛠️ Understanding Docker Containers and Their Lightweight Nature

Abhishek provides an in-depth explanation of Docker containers, describing them as lightweight packages that include an application along with its libraries and system dependencies. He clarifies that Docker containers do not have a full operating system but rather a minimal one, which contributes to their efficiency and ease of transfer. The paragraph also covers the size comparison between virtual machine snapshots and Docker container images, emphasizing the compactness and portability of the latter. The concept of a base image in Docker is introduced, which includes the necessary system dependencies for the container.

20:05

🔄 The Lifecycle of Docker and the Emergence of Builder

This segment outlines the lifecycle of Docker, starting from writing a Dockerfile to creating an image and then a container using specific Docker commands. The Docker engine's role as a potential single point of failure is discussed, along with the challenges of managing layers in Docker images. The introduction of Builder is presented as a solution to these issues, offering an alternative to Docker with a focus on simplicity and compatibility with modern tools. The paragraph concludes by inviting viewers to ask for clarifications if needed and to share the video with others.

Mindmap

Keywords

💡DevOps

DevOps is a set of practices that combines software development and IT operations with the goal of shortening the system development lifecycle and providing continuous delivery of high-quality software. In the script, DevOps is the overarching theme as the course aims to guide viewers through various concepts and tools used in this domain, with containers being a key part of modern DevOps practices.

💡Containers

Containers are lightweight, standalone, and executable software packages that include everything needed to run a piece of software, including the code, runtime, system tools, libraries, and settings. They are central to the script's discussion, with the instructor aiming to provide a foundational understanding of containers as part of a complete DevOps course.

💡Docker

Docker is an open-source containerization platform that automates the deployment of applications inside containers. The script introduces Docker as a popular term in the DevOps field, emphasizing its role in creating and managing containers, and indicating that it will be a focus area in the course.

💡Virtual Machines (VMs)

Virtual Machines are software emulations of physical computers that provide the functionality of multiple separate computers on a single physical machine. In the script, VMs are discussed as a precursor to containers, highlighting how they offer logical separation of applications on the same physical server but also pointing out their resource inefficiencies compared to containers.

💡Hypervisor

A hypervisor is a piece of software, firmware, or hardware that creates and manages virtual machines. The script explains the role of the hypervisor in virtualization technology, which is fundamental to understanding the evolution towards more efficient containerization.

💡Virtualization

Virtualization refers to the creation of a virtual version of something, such as virtual hardware, storage devices, or computer systems. The script uses the concept of virtualization to illustrate the transition from physical servers to VMs and then to containers, emphasizing the increased efficiency and reduced resource wastage.

💡Resource Utilization

Resource Utilization in the script refers to the extent to which the computing resources, like CPU and RAM, are being used by applications. The discussion highlights the inefficiency of VMs in utilizing resources to their full capacity, which is a problem that containerization aims to solve.

💡Builder

Builder, as mentioned in the script, is a tool for creating images and containers that aims to address some of the limitations of Docker, such as the single point of failure and the complexity of layers in Docker images. It is introduced as an important tool in the DevOps course, indicating a shift towards more efficient containerization practices.

💡Dockerfile

A Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image. In the script, the Dockerfile is presented as a fundamental component in the creation of Docker images, emphasizing the simplicity and importance of scripting container configurations.

💡Docker Engine

Docker Engine is the underlying platform that powers Docker containers, managing the creation, execution, and distribution of containers. The script points out the Docker Engine as a potential single point of failure, indicating the need for more robust container management solutions.

💡OCI Compliant

OCI, or Open Container Initiative, is an open industry standard for the container format and runtime. In the script, Builder is mentioned as being able to create images that are compliant with this standard, indicating interoperability and adherence to industry standards in containerization practices.

Highlights

Introduction to the concept of containers in the 23rd day of the complete DevOps course.

Announcement of a new Telegram group for sharing resources and its benefits over YouTube Community posts.

The importance of understanding the basics of containers before delving into more complex DevOps concepts.

Explanation of Docker's popularity and its significance in the DevOps field.

The necessity to comprehend virtual machines before grasping the concept of containers.

Overview of physical servers and the problem of underutilized resources.

Introduction to hypervisors and the concept of virtualization to maximize resource usage.

The logical separation provided by virtual machines and their role in secure application isolation.

The shift from physical servers to virtual machines and the remaining challenges of resource wastage.

The inception of containers as a solution to the inefficiencies of virtual machines.

Comparison between the architecture of containers on physical servers versus virtual machines.

The lightweight nature of Docker containers due to the lack of a full operating system.

The ease of transferring and shipping Docker containers due to their reduced size.

The Docker platform's role in creating and managing containers with Dockerfiles and commands.

The life cycle of Docker, from Dockerfile to image to container.

Introduction to the concept of a single point of failure in Docker engine and its implications.

The emergence of Builder as an alternative to Docker, addressing issues like single point of failure and layer complexity.

Builder's approach to creating container images using shell scripts and its compatibility with modern tools.

Invitation for feedback and questions from the audience to clarify any difficult concepts.

Transcripts

play00:01

hello everyone my name is Abhishek and

play00:04

welcome back to my channel

play00:06

so today is day 23 of our complete

play00:08

devops course and in this class I'll

play00:10

introduce you to the world of containers

play00:12

so before we jump on to the topic for

play00:14

today I would like to make an

play00:15

announcement that the other day I

play00:17

created a telegram group for our Channel

play00:19

and I will use this telegram group to

play00:22

share some important resources the

play00:23

resources that I'm that I come across

play00:25

while reading some content or you know

play00:28

while I surf through the medium blocks

play00:30

or any other resources so it will be

play00:32

very handy for me to share the resources

play00:33

on the telegram group instead on the

play00:36

YouTube Community post where the

play00:37

information gets ignored or you know

play00:39

after some time it is very difficult to

play00:41

scroll back and look into the resources

play00:43

that I share so if you haven't

play00:44

subscribed to other telegram Channel

play00:46

please use the link in the description

play00:47

to join the telegram Channel and use the

play00:51

resources that I'm going to share okay

play00:53

now coming to the topic for today that

play00:55

is containers so what we'll do today is

play00:57

we will

play00:59

try to understand the basics or

play01:01

introduction of containers this is very

play01:03

important because before you jump onto

play01:05

the uh Concepts like creating projects

play01:08

with containers or you know how one

play01:10

container interacts with the other

play01:12

container all of these things it is very

play01:14

important for you to understand the

play01:16

basics of container of containers

play01:18

afterwards I'll also try to explain you

play01:21

what is Docker so even if you are very

play01:24

new to devops you must have at least

play01:25

heard this term called as Docker because

play01:27

it is very popular so we will try to

play01:29

understand what is Docker but not today

play01:31

will not create any projects or will not

play01:33

look into the docker commands this is

play01:36

just an introduction class I want

play01:37

everybody to have their basic strong

play01:39

before we jump on to the uh creating

play01:42

projects and all other things then I'll

play01:44

also introduce you to build up

play01:47

because in this devops course I'm also

play01:50

going to explain you how to build

play01:52

projects using Builder because Builder

play01:54

is a tool that you have to watch for uh

play01:57

going ahead you will see more and more

play01:59

people uh asking you if you know Builder

play02:01

and you know people creating some

play02:04

complex projects with Builders so it is

play02:05

very important you for you to understand

play02:07

build as well because it has a very good

play02:10

Integrations with the modern day tools

play02:11

like Scorpio and podman so okay not

play02:15

today we'll not do any projects but we

play02:17

will understand the basics of it as well

play02:19

no

play02:21

before we jump onto this what you need

play02:23

to understand is a virtual machine so if

play02:25

you haven't watched the D3 on our

play02:28

complete devops or devops Zero to Hero

play02:31

course I'll definitely recommend to

play02:32

watch day three before you jump on to

play02:34

today's topic because before

play02:36

understanding the world of containers it

play02:37

is very important to understand the

play02:39

world of virtual machines because if you

play02:41

consider virtual machines as advancement

play02:43

to physical servers then containers is

play02:46

an advancement to Virtual machines so

play02:48

definitely you should have understanding

play02:50

of virtual machines so watch day three

play02:52

before you watch this video but as an

play02:54

overview like let's say you have a

play02:56

physical server you purchase this

play02:57

physical server from IBM or HP or it can

play03:00

even be your laptop right your laptop is

play03:02

also a physical server so most of the

play03:04

times when you use this physical server

play03:06

you don't use the resources completely

play03:09

right so that was the problem even if

play03:10

you are using your laptop you don't use

play03:12

the complete resources of your laptop so

play03:14

to avoid this problem okay by resources

play03:16

CPU RAM and Hardware all of these things

play03:20

so if it is one plus laptop then that is

play03:22

fine but when you are dealing with the

play03:23

organization you have thousands of

play03:25

servers and you are paying for all of

play03:26

these resources so that was one of the

play03:28

major challenge so to solve this problem

play03:30

A New Concept or you know there was an

play03:33

advancement in the technology and there

play03:35

was the Inception of hypervisor

play03:38

hypervisor uses a concept called as

play03:41

virtualization okay now what is

play03:43

virtualization as the name suggests

play03:45

virtualization is basically used to

play03:47

create a lot of virtual machines or

play03:49

virtual servers on top of your physical

play03:52

servers so virtual server is basically a

play03:54

logical separation right a physical

play03:56

server is something that you can see

play03:57

something that you have bought but

play03:59

virtual machine is a logical isolation

play04:01

or you know it's a virtual isolation

play04:03

where you have operating system for each

play04:06

of these virtual machines okay

play04:09

and on top of this operating system you

play04:12

would run your applications so instead

play04:14

of one physical server instead of

play04:16

running one application what you are

play04:17

going to do is you are going to run

play04:19

multiple applications and each of this

play04:21

application is run on a VM which has its

play04:24

own virtual operating system or I mean

play04:27

it has an operating system but this

play04:29

entire thing together is called as a

play04:31

virtual machine because it's a virtual

play04:32

isolation that is created by your

play04:34

virtualization platform and a hypervisor

play04:36

right so because each of these

play04:39

applications have their own operating

play04:40

system so they are very secure even

play04:42

though these applications are running on

play04:44

a same physical server but they are

play04:47

logically very tightly separated not

play04:50

tightly coupled they are tightly

play04:51

separated because of the individual

play04:53

operating system that they have right so

play04:56

this is the concept of virtual machine

play04:57

and how you can effectively use your

play05:00

physical server or your resources in the

play05:02

organization now this is very good right

play05:04

now why we have to move towards

play05:06

containerization but if virtualization

play05:09

is working very well why should we move

play05:11

towards

play05:12

containers so this is a question and

play05:14

this is how you will understand

play05:15

containers okay so let's again try to

play05:18

understand here that let's say you have

play05:21

a physical server and on top of this

play05:23

physical server you have installed a

play05:25

hypervisor

play05:27

okay it can be your laptop as well again

play05:30

so on top of your laptop also you can

play05:32

install a hypervisor and you can create

play05:33

much multiple virtual missions so for

play05:35

the easy understanding let's say that

play05:37

you bought this physical server of

play05:39

100 GB RAM and 100 CPU

play05:44

okay now what you have done is uh you

play05:46

thought that okay oh

play05:48

all of this 100 GB 100 CPU cannot be

play05:50

used by one team or one project or one

play05:52

application so you will use a hypervisor

play05:54

and you will create let's say four

play05:56

virtual machines okay vm1 vm2 vm3 and

play05:59

vm4 on top of which you installed

play06:01

operating system for each of this

play06:03

virtual machine it can be the same thing

play06:05

that you do with ec2 instances right

play06:06

what AWS does is they buy physical

play06:09

servers from one of these vendors or

play06:11

they manufacture their own physical

play06:13

servers and on top of this physical

play06:15

servers what they typically do is they

play06:17

install Zen hypervisors and using this

play06:20

Zen hypervisors they will ask you to

play06:23

create ec2 instances right so whenever

play06:25

you are using the whenever you are

play06:26

creating easy to install it's the same

play06:28

process you are basically using the

play06:30

virtualization platform of AWS and

play06:32

creating the virtual machines are easy

play06:34

to instances where you use whenever you

play06:37

are creating you define that what

play06:38

operating system you want and all of

play06:40

these things

play06:41

well this is very good and you created

play06:43

let's say 25 GB RAM for each of this

play06:46

virtual machine

play06:47

but oscillate your organization realized

play06:50

that you are not using the complete

play06:52

capacity of this virtual machine right

play06:54

so you have saved some money from moving

play06:56

to physical servers to Virtual machines

play06:58

but even though even after moving to

play07:01

Virtual machines you have realized that

play07:02

one of your virtual machine or all of

play07:04

your virtual machines are not using the

play07:06

resources to their fullest capacity that

play07:08

means virtual machine one has

play07:11

application one and this application one

play07:14

on its best day let's say that uh this

play07:17

virtual machine this application one

play07:19

receives the maximum threshold load and

play07:21

even after that it was only using 10 GB

play07:24

Ram

play07:25

and some 6 CPU that means it is using

play07:30

only less than half or it is using like

play07:33

you know it is wasting 15 GB RAM and

play07:36

some you know 19 CPUs even when this

play07:39

application is running on the full

play07:40

capacity okay and when it is running on

play07:43

the less capacity that means it is even

play07:45

using a very less resources and it is

play07:47

wasting a lot of resources now you can

play07:50

probably say that okay on full capacity

play07:52

it is using only 10 GB so let me reduce

play07:53

it but what happens when it is running

play07:55

on low capacity or what happened when

play07:57

this application is not at all receiving

play07:58

the load so in that time you are wasting

play08:01

more than uh this 15 GB and 19 CPU

play08:04

resources so this was one of the major

play08:06

drawback of virtual machines you can see

play08:09

the same scenario on your ec2 instances

play08:11

as well right so what happens is as a

play08:13

devops engineer you might have created

play08:15

many ec2 instances you might be playing

play08:17

with Jenkins you might be even uh the

play08:19

viewers of our Channel all these 22 days

play08:21

we have created a lot of examples and

play08:23

everything we tried on easy to instance

play08:25

but was there a case Okay so this is a

play08:28

question that I'm asking was there a

play08:30

case when you have seen that you are ec2

play08:31

instance was running out of memory

play08:34

how many times so if it is running out

play08:37

of memory how many times did you see

play08:39

this error

play08:40

very very less right so you must have

play08:42

seen I think most of the people must

play08:44

have not seen this error that your ec2

play08:46

instance is running out of uh resources

play08:48

even if it is running out of resources

play08:50

you must have seen it very less number

play08:51

of times that means most of the times

play08:53

you are using this ec2 instance with not

play08:57

I mean with very very less resources and

play08:59

you are wasting a lot of resources this

play09:01

is a free instance so you don't have a

play09:02

problem but what if an organization that

play09:04

is using some 1 million ec2 instances

play09:07

okay so let's say an organization is

play09:09

using 1 million ec2 instances and

play09:12

they are seeing that all of these 1

play09:15

million instances or most of the 1

play09:16

million instances are wasting resources

play09:18

so it is heavy loss for the organization

play09:23

so to solve this problem containers are

play09:26

the Inception of containers taken place

play09:28

right so containers will solve the same

play09:30

problem that is they will effectively

play09:33

use your virtual machines to even reduce

play09:35

this problem so the problem with

play09:37

physical servers was solved to some

play09:39

extent using virtual machines now to the

play09:41

problem of virtual machines is also sold

play09:43

to some extents with containers why I

play09:45

said to some extent because containers

play09:47

still have some drawbacks

play09:49

you can use some Advanced security

play09:51

policies or you know you can do some

play09:53

more things but even today virtual

play09:54

machines are very very secure when

play09:56

compared to Containers because I'll I'll

play09:58

tell you the reason but uh just to tell

play10:00

in in one single line virtual machines

play10:02

have a full operating system so that

play10:04

means they have complete isolation

play10:06

whereas with containers you will see

play10:07

that containers do not have a complete

play10:10

operating system and they do not run

play10:12

their full operating system so that

play10:14

means there is a logical isolation but

play10:16

the logical isolation is not complete

play10:18

there is one one or other way where you

play10:20

can talk from one container to another

play10:22

container or for each of these container

play10:24

talk to the host operating system to

play10:26

share some resources so there are some

play10:28

drawbacks so what we can say is virtual

play10:30

machines have solved some problems with

play10:32

physical servers and containers have

play10:34

solved some problems with virtual

play10:36

machines

play10:37

okay now let's Deep dive and see what is

play10:40

the architecture of containers because

play10:41

I've told you that okay containers have

play10:44

solved some problems with virtual

play10:45

machines and all of these things let us

play10:47

see the architecture to understand it

play10:48

even in a better way right so containers

play10:51

can be created in two ways one is you

play10:54

can create containers on top of virtual

play10:56

machines and the other is you can create

play10:57

containers on top of physical servers as

play10:59

well okay so let's say this is model one

play11:02

where water devops engineer will do is

play11:05

he will use the IBM or HP servers in his

play11:10

data center in his organization data

play11:11

centers what he'll do is install a

play11:14

operating system on top of the operating

play11:15

system he'll install Docker or any other

play11:18

containerization platform to create

play11:19

containers you'll need a contamination

play11:21

platform just like to create virtual

play11:23

machines you need a hypervisor or a

play11:24

virtualization platform

play11:26

so Docker can you created a Docker

play11:29

platform or a continuation platform and

play11:31

on top of this you have created multiple

play11:33

containers

play11:34

okay so this is one way of creating

play11:37

containers and the other way is you can

play11:39

basically create a ec2 instance or a

play11:41

virtual machine anything on top of a

play11:44

physical server okay let's say this is a

play11:45

physical server it can be uh your Amazon

play11:48

or cloud provider physical servers or it

play11:50

can be physical server on your

play11:52

organization as well okay so on top of

play11:54

this you have created a virtual machine

play11:55

on top of virtual machine you can create

play11:58

docker

play12:00

okay so here you are directly creating

play12:02

on the physical servers and here you are

play12:05

creating on top of the virtual machines

play12:06

so Docker or continuation platforms do

play12:09

not really care if they are doing the

play12:12

containerization on top of physical

play12:14

servers or on top of virtual machines

play12:16

and you will see more and more

play12:18

organization using the model 2.

play12:22

why because you know when you are

play12:25

maintaining your own physical servers

play12:27

there is a lot of Maintenance overhead

play12:29

right so there has to be a dedicated

play12:31

team who maintains these physical

play12:33

servers Whenever there are new patches

play12:36

Whenever there are new security fixes or

play12:37

whatever is the case you have to

play12:39

maintain your data center right

play12:41

so you need system administrators

play12:43

whereas if you are moving to AWS or any

play12:45

other cloud provider or you are creating

play12:47

virtual machines on top of any physical

play12:49

servers so your maintenance overhead is

play12:52

less unless you own that physical

play12:53

servers so that's why these days you

play12:56

will see more and more of model 2.

play12:58

initially people were using model one as

play12:59

well but now the usage pattern has

play13:02

changed or shifted a lot to model 2

play13:04

because these days everybody is on cloud

play13:06

provider and these days you know uh

play13:09

people are looking to reduce the

play13:10

maintenance overhead organizations are

play13:12

not willing to maintain their own data

play13:13

centers so to solve all of these

play13:15

problems they are using model 2.

play13:18

so in model 2 you will have a physical

play13:21

server but if you are using a cloud

play13:23

provider you will not see this physical

play13:24

server you will directly start from this

play13:27

step where you will create a ec2

play13:28

instance or where you will create a

play13:30

virtual machine on Azure platform on top

play13:32

of it you will create a contraction

play13:34

platform like Docker or any other

play13:35

continuation platform and on top of it

play13:38

you will start creating containers

play13:41

okay so you might say that okay both of

play13:43

the diagrams looks very similar what is

play13:46

the difference like I told you the major

play13:48

difference is that containers are very

play13:50

lightweight in nature okay why are they

play13:52

lightweight first of all let's try to

play13:54

understand that then let's move to the

play13:55

next thing so the docker containers

play13:57

basically as I told you they do not have

play14:00

okay they do not have a complete

play14:03

operating system if this is C1 C2 C3 C4

play14:06

C5 so the docker containers on on a

play14:09

contrary virtual machines if we see the

play14:11

previous example a virtual machine has a

play14:13

complete operating system and they have

play14:15

a complete isolation and security

play14:17

whereas containers what they do is they

play14:19

use the resources from the base

play14:22

operating system or they use the

play14:24

resources from the virtual machine or

play14:26

physical server that they are running on

play14:27

for example if the virtual machine is

play14:29

using a Linux platform and your

play14:32

container requires any dependencies or

play14:34

you know it requires any uh

play14:36

any shared libraries or any of the

play14:39

things from the uh host operating system

play14:42

or the host virtual machine they will

play14:44

share the resources so all of them will

play14:45

try to use from the host operating

play14:47

system so this is one of the major thing

play14:49

so saying that do I mean to say

play14:51

containers do not have operating system

play14:53

at all no they will have a minimal

play14:55

operating system or they will have a

play14:57

base image

play15:00

okay so a container is nothing but a

play15:03

container is a package

play15:05

or it's a bundle which is a combination

play15:08

of your application

play15:12

plus your application libraries that

play15:15

means your application dependencies

play15:19

plus system dependencies

play15:23

okay your application might require some

play15:26

system dependencies let's say your

play15:27

application might require python or your

play15:29

application might require any any system

play15:30

dependencies so what your Docker

play15:33

container does is it will be a package

play15:35

of your application libraries and system

play15:37

dependencies any other system related

play15:39

packages or any other shared libraries

play15:42

okay let's say your Etc or your any

play15:44

other shared libraries will be used from

play15:47

the host operating system so that's why

play15:49

Docker containers are very very

play15:51

lightweight in nature so for example you

play15:53

have a virtual machine okay to take a

play15:56

backup of your virtual machine or to

play15:57

create an image of your virtual machine

play15:59

what you will do is for your virtual

play16:01

machine you will create a snapshot

play16:04

right so usually the snapshots are 2GB

play16:08

3gb 1GB right this will be the size of

play16:12

your snapshots I'm taking a basic

play16:13

example okay even if you consider a very

play16:15

minimal so your snapshots might go to

play16:17

1GB with your application installed all

play16:20

the dependencies installed and

play16:21

everything

play16:22

whereas with container if you it depends

play16:25

on the type of container again but with

play16:26

container you might see this falling

play16:29

into MBS like it can be 100 MB okay if

play16:32

your application has a lot of

play16:33

dependencies it might go up like 500 MB

play16:35

or depends on how you are using the base

play16:38

image are you using multi-stage Docker

play16:40

and all of the things I'm not going into

play16:41

the details but you need to understand

play16:43

that there is a significant

play16:45

drop in the size of your image so

play16:48

because the size of the image or the

play16:50

containers are lightweight in nature

play16:51

what happens is they are even easy to

play16:53

ship what do I mean by ship to move from

play16:55

one place to another let's say you want

play16:57

to deploy this Docker container onto a

play16:59

container platform or you want to deploy

play17:01

this uh Docker image onto kubernetes or

play17:03

anything they are very easy to ship and

play17:05

they're very easy to transfer okay so

play17:07

this is one more Advantage what I am

play17:09

trying to convey here is Docker

play17:12

containers are very lightweight in

play17:14

nature and if somebody asks you why are

play17:16

they lightweight in nature because they

play17:18

do not have a

play17:19

uh complete operating system okay you

play17:22

can say that Docker containers or

play17:24

containers do not have a full operating

play17:27

system

play17:29

and they use the resources from the

play17:33

base operating system or the operating

play17:35

system on which they are running on but

play17:37

your container like let's say uh you

play17:40

have a virtual machine and on top of

play17:42

this virtual machine you want to run

play17:43

some 10 containers and one container

play17:46

requires python to Second container

play17:48

requires node.js third container

play17:49

requires Java let's say they are in

play17:51

different different forms so what you

play17:53

will do is like I told you in your

play17:55

Docker image you can use a base image

play17:57

and this base image like I told you it

play18:00

can have all of the system dependencies

play18:04

okay so this system dependencies along

play18:07

with your application Plus application

play18:09

libraries will form your Docker

play18:11

container or will form your Docker image

play18:14

so that's why never say that Docker

play18:17

images or Docker containers do not have

play18:18

an operating system but they will not

play18:21

have a complete or full operating system

play18:23

they will have a very minimalistic Os or

play18:25

they will have a very minimalistic

play18:27

system packages system dependencies so

play18:29

this is about your Docker containers or

play18:31

containers in general so whenever I am

play18:33

saying Docker containers always

play18:35

understand that I am talking about

play18:36

containers and the concept of

play18:37

containerization the reason why I am

play18:39

saying Docker container so that many

play18:41

people will will be able to correlate

play18:43

because always most of the times when

play18:44

you are reading about containers it is

play18:46

like equivalent to reading about Docker

play18:48

containers

play18:49

uh like I told you in this specific

play18:51

course we'll also cover Builder so that

play18:53

you will get to see a different

play18:54

perspective all the time we talk about

play18:55

Docker but now you will also see using

play18:57

these codes the other way of creating

play18:59

images and you know deploying the

play19:01

containers

play19:02

I hope the concept of containers is

play19:04

clear till now now what what happens is

play19:07

why Docker is very popular so Docker was

play19:10

a containerization platform and Docker

play19:12

helped with the community to write the

play19:15

docker images like Docker came up with

play19:16

uh at improving this concept of uh

play19:19

containerization and it created a lot of

play19:22

commands like user interface and you

play19:25

know user experience with Docker using

play19:27

some Docker commands has become very

play19:29

simple so to create a container what

play19:31

Docker has done is it said that okay you

play19:33

don't have to worry a lot all that you

play19:35

need to do is you can simply write a

play19:37

Docker file

play19:39

right just like we write Jenkins files

play19:41

or just like we write uh any other

play19:43

script files you can simply write a

play19:45

Docker file and you can submit this to

play19:48

Docker platform or you can submit this

play19:50

to Docker engine

play19:53

using some Docker command okay I'll

play19:55

explain that comments don't worry about

play19:56

it and this Docker engine will convert

play20:00

this Docker file into an image okay this

play20:03

is a Docker image or a container image

play20:05

now again using some Docker commands you

play20:07

can convert this image into container

play20:11

okay so if somebody is asking you what

play20:14

is the life cycle of Docker or what is

play20:16

the life cycle of containers what you

play20:18

will say is the first stage would be to

play20:21

write again I'm only talking about

play20:22

Docker files for now let us ignore about

play20:24

builder for now so the first stage would

play20:27

be to write a Docker file

play20:32

and to execute this Docker file and

play20:34

create a

play20:37

contain uh

play20:39

sorry and to create an image

play20:43

and again execute this image and create

play20:46

a container

play20:51

so if you are using Docker platform

play20:54

what will happen is there is something

play20:56

called as Docker engine

play20:58

okay which will receive all of these

play21:00

inputs so you want to convert from

play21:03

Docker file to Docker image to Docker

play21:05

container you can submit your Docker

play21:07

commands

play21:10

to this Docker engine and it will create

play21:12

all of these things just for your

play21:14

reference basically what we'll do is

play21:16

whenever we want to uh create a Docker

play21:19

convert from Docker file to Docker image

play21:21

you'll use a command called as Docker

play21:23

build

play21:24

and again here to create a container out

play21:27

of image you will use a command called

play21:28

as Docker run or exec like just consider

play21:31

a Docker Run Okay so this way you can

play21:34

create Docker file to image and from

play21:36

image to container this is a life cycle

play21:37

of docker

play21:39

so now said a lot of things now let us

play21:42

also try to see that okay now everything

play21:45

is looking good what what is the reason

play21:46

for new tools and new technologies don't

play21:49

worry about this next five minutes that

play21:51

I am talking about so if the things are

play21:53

going out of your head or you know if

play21:55

things are going slightly uh complicated

play21:57

don't worry about it right now because

play21:59

anyways when we do the live projects

play22:00

we'll understand more about these

play22:02

details but because I also want to

play22:04

introduce you uh Builder so what is the

play22:06

problem here is that docker

play22:11

is basically more very much dependent on

play22:15

something called as Docker engine okay

play22:17

and this Docker engine is basically a

play22:20

single point of failure

play22:23

what is SPF it's a single point of

play22:25

failure now let's say if a Docker engine

play22:27

is down for some reason that means to

play22:30

say that all your Docker containers will

play22:33

stop working

play22:34

this is a terrible way right so off late

play22:38

the uh organizations are off late the

play22:40

docker Community is working on this one

play22:42

and the major drawback is that till now

play22:44

there is no I mean till now you cannot

play22:46

uh work around with this issue that if

play22:48

your Docker engine is going down then

play22:50

all of your containers will not be

play22:51

responding and your customers like let's

play22:54

say you are using Docker and you are a

play22:55

test team or your customers is looking

play22:57

away uh but your containers are not

play23:00

working or not responding because your

play23:01

Docker engine is down

play23:04

So to avoid this single point of failure

play23:07

and to solve various challenges like

play23:09

what happens is whenever a Docker image

play23:11

is being built from Docker file it

play23:13

creates a lot of layers so again as I

play23:15

told you don't worry about this

play23:16

particular section right now if you are

play23:18

not able to understand it don't worry

play23:19

while we do a lot of projects on Docker

play23:22

you will understand but

play23:23

it creates a lot of layers and each of

play23:25

this layer again takes a lot of you know

play23:27

space or you know a lot of storage on

play23:30

your disk so to solve again this problem

play23:32

instead of creating a lot of layers you

play23:34

can uh and to solve the problem of lot

play23:37

of layers to solve the problem or single

play23:39

point of failures and other challenges

play23:42

Builder

play23:45

said that okay let me uh create a tool

play23:47

and this tool will help you to solve

play23:50

this problem so build a will aim to

play23:52

solve the layers problem spof problem uh

play23:54

Simplicity it works very well with

play23:56

Scorpio and apartment so that's why you

play23:59

should also learn Builder so it doesn't

play24:01

take a lot of time buildup basically

play24:03

works a lot on commands so you don't

play24:05

have to write something like Docker

play24:06

files so in Builder you can basically

play24:09

write a shell script and in the shell

play24:11

script you can put all of the Builder

play24:12

commands and it would create a image for

play24:15

you and this image can be a Docker image

play24:17

or any other oci compliant image so

play24:20

Builder also supports Docker images you

play24:22

can also create a Docker images using

play24:24

Builder right so this is uh basically

play24:27

about the introduction to Containers if

play24:29

something is not uh easy to understand

play24:31

please let me know like I told you uh

play24:34

provide me the timestamp and tell me

play24:35

that okay at this point of time I'm not

play24:37

able to understand something so that I

play24:39

can create a YouTube shorts video or I

play24:41

can reply back to you in the comment

play24:43

section saying that okay this is uh how

play24:45

it works and all of the things or I can

play24:46

share some reference material I hope you

play24:49

enjoy the video if you like the video

play24:50

click on the like button if you have any

play24:52

questions post that in the comment

play24:53

section and don't forget to share this

play24:56

with your friends and your colleagues

play24:57

I'll see in the next video take care

play24:59

everyone bye bye

Rate This

5.0 / 5 (0 votes)

Etiquetas Relacionadas
DevOpsContainersDockerVirtualizationVMsHypervisorResource ManagementAutomationCloud ComputingInfrastructure
¿Necesitas un resumen en inglés?