What is Docker?

Telusko
31 Mar 202010:31

Summary

TLDRThis video delves into Docker, an ecosystem for creating containers that encapsulate applications with their dependencies, ensuring consistent performance across development, testing, and production environments. It contrasts Docker with hypervisors, highlighting Docker's efficiency by sharing the host OS among containers, thus conserving resources. The video also touches on Docker's components, such as Docker Hub and the Docker engine, and mentions the availability of pre-built images, making it easier to deploy applications. The speaker invites viewers to explore Docker further, hinting at its utility in upcoming tutorials.

Takeaways

  • 😀 Docker is an ecosystem that facilitates the creation and management of containers, which are isolated environments that can run applications consistently across different computing environments.
  • 🛠️ The need for Docker arises from the challenges developers, testers, and operations teams face in ensuring that applications run smoothly across different environments due to varying dependencies and libraries.
  • 💻 Developers often use frameworks and libraries that require specific versions or dependencies, which can lead to compatibility issues when the application is tested or deployed on different systems.
  • 🔄 The 'it works on my machine' problem is a common issue where an application runs perfectly on a developer's system but fails on a tester's or production server due to differences in dependencies and environment configurations.
  • 🌐 Hypervisors, like virtual machines, solve some of these issues by allowing multiple operating systems to run on the same hardware, but they can be resource-intensive and require multiple licenses.
  • 📦 Docker containers, unlike hypervisors, do not require a separate OS for each application, sharing the host OS's kernel and only isolating the application and its dependencies, thus saving resources.
  • 🚀 Docker images are snapshots of a container that can be shared and used to create new containers, ensuring that the application and its environment are consistent across different machines.
  • 🔄 Docker Hub is a public repository where users can find and share Docker images, making it easy to deploy applications that require specific environments or dependencies.
  • 🏢 Docker, the company, offers both a community edition (Moby) and an enterprise edition, with the latter providing additional support and features.
  • 🔧 Docker's client-server architecture includes a Docker engine that manages the building, shipping, and running of containers, streamlining the development and deployment process.

Q & A

  • What is Docker and why is it needed?

    -Docker is an ecosystem that allows for the creation and use of containers, which are lightweight, portable, and self-sufficient software packages that include everything needed to run a piece of software, including the framework, libraries, dependencies, and even the OS-level features. It is needed because it provides a consistent environment for developing, shipping, and running applications, ensuring that they work seamlessly across different systems and platforms.

  • How does Docker help in the software development lifecycle?

    -Docker streamlines the software development lifecycle by enabling developers to create containers with all the necessary dependencies and configurations. This ensures that the application runs consistently from development to testing to production, eliminating 'works on my machine' problems and reducing dependency conflicts.

  • What is the problem with dependencies when shipping an application without Docker?

    -Without Docker, when an application is shipped to testing or production environments, there can be issues with dependencies due to version mismatches or missing libraries. This can lead to the application not running as expected, causing delays and additional work to resolve these discrepancies.

  • How do virtual machines compare to Docker containers in terms of resource usage?

    -Virtual machines (VMs) run a full guest operating system on top of a hypervisor, which can be resource-intensive as each VM requires its own OS. In contrast, Docker containers share the host OS kernel, making them more lightweight and efficient in terms of CPU, memory, and storage usage.

  • What is a Docker image and how is it used in the containerization process?

    -A Docker image is a read-only template that contains the application, its dependencies, libraries, and configuration files. It is used to create containers by defining the environment in which the application will run. Once an image is created, it can be used to spawn multiple containers that are consistent with the application's intended environment.

  • Why might a company choose to use Docker over traditional hypervisor-based virtualization?

    -Companies might choose Docker over traditional virtualization because it is more resource-efficient, faster, and provides a more consistent environment for applications. Docker containers are also easier to manage and scale compared to VMs, and they can simplify the deployment process across different environments.

  • What is the Docker Hub and what role does it play in the Docker ecosystem?

    -The Docker Hub is a cloud-based registry service that allows users to link code into images, collaborate on projects, and share images with other users. It serves as a central repository for Docker images, making it easier to distribute and manage containerized applications.

  • How does Docker help in avoiding the 'it works on my machine' problem?

    -Docker helps avoid the 'it works on my machine' problem by ensuring that the same environment, including all dependencies and configurations, is used across different stages of the development lifecycle. This consistency means that if an application runs on one developer's machine, it should also run the same way on testing and production environments.

  • What are some of the benefits of using Docker for application deployment?

    -Using Docker for application deployment provides benefits such as faster deployment, easier scaling, consistent environments, and reduced overhead compared to traditional deployment methods. It also simplifies the management of application dependencies and allows for the quick creation and management of application instances.

  • How can Docker be used for educational purposes or demonstrating tools?

    -Docker can be used for educational purposes by creating containers with specific software, frameworks, or tools pre-installed. These containers can then be shared with students or users, allowing them to quickly and easily access the required environment without needing to install anything on their local machines.

  • What is the difference between Docker's community and enterprise versions?

    -Docker's community version is open-source and free to use, while the enterprise version offers additional features and support for a fee. Both versions have similar core functionalities, but the enterprise version is tailored for businesses that require more robust support, security, and scalability.

Outlines

00:00

🐳 Introduction to Docker

The paragraph introduces Docker as an ecosystem for creating containers to run applications. It discusses the need for Docker from the perspective of developers, testers, and operations teams. The main challenge highlighted is the dependency issues that arise when an application is built with specific frameworks and libraries, which might not be the same on the tester's machine. The paragraph emphasizes the importance of ensuring that the application runs consistently across different environments, which is where Docker's containerization comes into play.

05:00

🔧 Hypervisors and the Problem They Solve

This paragraph delves into the concept of hypervisors and virtual machines as a solution to dependency issues. It explains how a hypervisor allows for the creation of virtual machines, each with its own operating system, thus encapsulating the entire environment needed for an application. The paragraph outlines the process of shipping a virtual image to testers and production, ensuring that the application runs as expected without dependency clashes. However, it also points out the inefficiencies and resource wastage associated with running multiple operating systems on the same hardware.

10:01

📦 Containers: The Docker Advantage

The final paragraph contrasts Docker containers with hypervisors, highlighting that containers do not require separate operating systems, thus sharing the host OS and saving resources. It discusses how Docker allows for the creation of containers from images that include the application, its dependencies, and the necessary environment. The paragraph also touches on the ease of sharing and reusing these images, the Docker ecosystem, and the company behind Docker. It concludes by hinting at the practical application of Docker in high-performance computing and encourages feedback for further exploration of Docker concepts.

Mindmap

Keywords

💡Docker

Docker is an open-source platform designed to make it easier to create, deploy, and run applications by using containers. It packages software into standardized units that contain everything needed to run, including the code, runtime, system tools, libraries, and settings. In the video, Docker is discussed as a solution to the problem of dependency clashes and inconsistent environments across development, testing, and production stages.

💡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, system libraries, and settings. They allow developers to package up applications along with their dependencies and ship them as one package to any environment. In the video, containers are presented as a more efficient alternative to hypervisors, allowing multiple applications to run on the same OS without the need for multiple OS installations.

💡Dependencies

Dependencies refer to external libraries, frameworks, or services that an application relies on to function properly. In the context of the video, dependencies are crucial because they can cause compatibility issues if different versions are used in development and testing environments. Docker helps manage these dependencies by packaging them with the application in a container.

💡Development

Development in the video refers to the process of creating software applications. Developers use various frameworks and libraries to build applications, and Docker can be used to ensure that the application, along with all its dependencies, is packaged in a container for consistent deployment across different environments.

💡Testing

Testing is the phase where the application is checked for bugs and errors before it is deployed to production. The video discusses how inconsistencies in dependencies can lead to issues during testing. Docker helps by providing a consistent environment for testing, ensuring that the application behaves the same way as it does in development.

💡Production

Production refers to the final stage where the application is deployed to a server and made available to end-users. The video highlights the importance of having a consistent environment in production as in development and testing, which Docker facilitates by using containers.

💡Frameworks

Frameworks are pre-built software structures that provide a foundation for developing applications. Examples mentioned in the video include Spring Framework for Java and Django for Python. Docker can package these frameworks along with the application into a container, ensuring that the application runs the same way in any environment.

💡Hypervisors

A hypervisor is a software that allows multiple operating systems to run on a single physical host by creating virtual machines. In the video, hypervisors are discussed as an initial solution to dependency issues but are considered resource-intensive because each virtual machine requires its own OS.

💡Docker Hub

Docker Hub is a cloud-based registry service that allows users to link code repositories, build images, and store them. It's a central place to share and collaborate on container images. The video briefly mentions Docker Hub as part of the Docker ecosystem, where users can pull pre-built images to quickly set up environments.

💡Docker Engine

Docker Engine is the underlying technology that powers Docker and enables the creation and management of containers. It's a client-server architecture that includes a daemon, client, and a REST API. The video touches on Docker Engine as part of the broader Docker ecosystem, which facilitates the use of containers.

💡Images

In the context of Docker, an image is a read-only template with instructions for creating a container. It includes the application, its dependencies, and the necessary configurations. The video explains that developers can create an image of their application and its environment, which can then be used to create containers in testing and production.

Highlights

Docker is an ecosystem for creating and running containers.

Docker helps in providing software to users by facilitating the development, testing, and deployment process.

Developers use frameworks and dependencies to build applications, which can lead to version clashes during testing.

The 'works on my machine' problem is a common issue due to different environments and dependencies.

Hypervisors, like virtual machines, allow for the creation of virtual OS images to solve dependency issues.

Virtual machines can be resource-intensive and require multiple OS licenses.

Docker introduces the concept of containers that share the same OS kernel, reducing resource usage.

Containers can be created from images, which package the application and its dependencies.

Docker images can be shared and pulled from public repositories, simplifying the setup process.

Docker's client-server architecture includes a Docker Engine that manages the containers.

Docker offers both community and enterprise versions, with the latter providing additional support.

Docker can be used to create custom environments for teaching or demonstrating tools without installation.

Docker Hub is a platform for sharing and managing Docker images.

Docker's ecosystem includes a variety of tools and services that facilitate containerization.

The video discusses the potential for a series on Docker for further in-depth exploration.

Docker is set to be utilized in high-performance computing scenarios.

Transcripts

play00:00

[Music]

play00:03

welcome back aliens monuments of Nvidia

play00:06

in this video we'll talk about docker

play00:07

docker is basically an ecosystem where

play00:09

you can create containers where you can

play00:11

run containers but then why do we need

play00:12

it see we can talk about this docker in

play00:15

detail but then the main question is why

play00:17

do we need Dockers now think about this

play00:19

as a developer or as a tester or as

play00:21

operation team what we do is we work

play00:24

with Sophos like the ultimate thing is

play00:26

to provide a software so that your user

play00:29

can use it I'm talking about the web

play00:31

application now all web services so what

play00:33

we do is we build an application

play00:34

normally development team they pay a

play00:37

software and then this soffit goes for

play00:39

the testing so testing team will be

play00:41

doing the testing on it all and then

play00:43

after that if everything is going good

play00:44

of course if something goes wrong it it

play00:46

comes back to development team but what

play00:48

if everything is perfect then goes for

play00:50

the operation team so that they can

play00:51

deploy the application on broad server

play00:53

of course depend upon company this

play00:55

process might change but then we have

play00:57

these steps right there look the

play00:59

application there's the application and

play01:00

ship it to the production server so that

play01:02

we can run there one thing is when as a

play01:04

developer when you build an application

play01:05

you might be using some framework so

play01:07

let's say if you're working one job or

play01:08

you might be using Spring Framework

play01:10

maybe you want to build a web

play01:11

application using using Python so you'll

play01:13

be using Django framework so what we do

play01:16

is when when we want to build an

play01:17

application we have a framework and this

play01:20

framework will need certain libraries

play01:21

some dependencies or maybe some O's

play01:23

level features so what we do is when you

play01:26

want to start with the application you

play01:28

need before even before touching the

play01:29

application you have to download

play01:31

dependencies you have to download the

play01:32

libraries now the thing is after

play01:35

researching which library to use after

play01:37

is searching with dependence that you

play01:38

use you will download them and you will

play01:40

have those things on your machine so you

play01:42

have your framework you have your

play01:44

application you have your dependencies

play01:45

and maybe some postal features now

play01:49

everything is done right your product is

play01:51

ready with you and of course the next

play01:53

step would be testing so you will ship

play01:55

this product to the ship to the testing

play01:57

team but the problem is the testing team

play01:59

when they start using your application

play02:01

they might face issues so there's

play02:03

nothing wrong with the software what

play02:05

went wrong is with with the dependencies

play02:07

because the dependency which you have

play02:09

used of course you have list them all

play02:11

the dependencies which are required so

play02:13

they might be download

play02:14

those dependencies or maybe you are

play02:15

sending those dependencies in a jar file

play02:18

or dinner in a zip file the problem is

play02:20

it's not just the number of dependencies

play02:22

it's also the versions right so maybe

play02:23

you have used our version 4.2 and then

play02:26

they might be using 4.0 so there will be

play02:29

a clash your software will generate

play02:30

issues the problem is with the

play02:32

dependencies and the libraries and

play02:34

sometime you know what happens when you

play02:35

are building an application your

play02:37

application may need some extra

play02:38

dependencies which even you are not

play02:40

aware of so what happens is maybe you

play02:42

have worked on some earlier projects and

play02:43

those projects needed some dependencies

play02:45

which you have in your machine but the

play02:48

same thing is not there in the tester

play02:49

machines but testing team will say hey

play02:51

developer something went wrong something

play02:52

went wrong because of you and you will

play02:54

be saying hey it was working on my

play02:55

machine is not working on your machine

play02:57

so it's something wrong with your

play02:58

machine we can have a blame game there

play03:00

but that's not happen if it happens in

play03:01

the company but then we can you might

play03:03

imagine a scenario right they might be

play03:04

thinking this in the in their head so

play03:06

what if you can when you when you are

play03:09

shipping the application the application

play03:11

which you have build not just

play03:13

application but you have to ship

play03:15

everything the framework dependencies

play03:17

and that is everything so you will take

play03:19

take the entire stuff and give it to the

play03:21

testing team but is it possible is it

play03:24

possible to give everything the thing is

play03:26

some dependencies and libraries are

play03:29

dependent on the OS so you have to give

play03:31

the entire OS and that's not practically

play03:33

possible right you find copy or say -

play03:34

haven't give it to someone else and

play03:35

that's where we got a solution and that

play03:38

solution is hypervisor okay if you don't

play03:41

know about hypervisors think about

play03:42

virtual machines all VM very few that's

play03:44

very famous software which you might

play03:45

have used in your polish days or in your

play03:48

company so what we do using the virtual

play03:51

machine is so you have a hardware so you

play03:53

have a physical hardware and on that

play03:55

hardware you install an OS of course

play03:57

every app every machine has arose maybe

play04:00

Windows or Linux based OS for Macintosh

play04:03

now on that OS you will be installing a

play04:05

hypervisor or VMware basically now this

play04:08

VMware can install another OS now the

play04:11

amazing thing is when you install the

play04:12

new OS now this OS can be back and you

play04:15

can ship it so you can create an image

play04:17

of it so the amazing thing is when you

play04:19

give this OS to someone else they can

play04:21

load it the same OS and this OS will

play04:23

have everything so what I'm saying is a

play04:26

Hardware OS hypervisor

play04:28

and you're always the customers or the

play04:29

or the virtual OS now on this virtual OS

play04:32

okay you can do anything you want you

play04:34

can install software you can install

play04:36

dependencies you can you can build an

play04:38

application now when you're giving the

play04:40

application to the testing team don't

play04:42

just give the software give the entire

play04:45

image of your OS the virtual image which

play04:47

you say and then once they get the image

play04:49

they can create an instance of it so

play04:51

basically you can imagine the concept of

play04:54

classes and objects in Java when you

play04:56

give up class they can create objects

play04:58

they can do it instances of it of course

play05:00

you can't the running image but you can

play05:02

run instances with one image you can

play05:04

have multiple instances running so you

play05:05

can have ten instance if you have

play05:06

hundred instances so that's amazing

play05:08

right so the testing team will they will

play05:10

run the instance now the amazing thing

play05:11

is they don't have to worry about

play05:13

dependencies because you have given them

play05:15

everything the software which you have

play05:17

built libraries dependencies and maybe

play05:19

some oysters features now they will be

play05:21

testing the application not the

play05:23

dependencies but they will test your

play05:25

your logic and everything is working or

play05:27

not and then if everything goes well

play05:29

even they don't have to I know think

play05:32

about the production server they can

play05:34

simply create a virtual image again the

play05:36

new image we making after making some

play05:38

changes and give it to the production

play05:40

now production will have the image they

play05:43

will get the image and the ops team they

play05:44

will simply clear instance everything is

play05:46

running right so if if this software

play05:49

works on your machine it will also work

play05:51

on the server that's great right that's

play05:54

the concept of hypervisors but then

play05:56

something went wrong right because the

play05:58

the title of the video talks about

play06:00

docker in fact in the start of the video

play06:01

I've said hey we will talk about docker

play06:03

and I'm talking about hypervisors so the

play06:06

problem with hypervisor is it's a great

play06:07

concept right so if hypervisor was

play06:09

perfect we don't even need Dockers but

play06:11

the thing is hyper was I still agreed

play06:13

okay there are lot of application there

play06:14

a lot of companies they're still using

play06:15

hypervisors for various reasons might

play06:18

for one of the reason why hypervisor is

play06:21

not referred is the the thing is when

play06:24

you install in OS when you install the

play06:26

hypervisors and then you have to install

play06:28

another OS now what if you have a server

play06:30

and then you want to run multiple

play06:31

application so imagine every application

play06:34

will need its own OS then that will be

play06:37

bulky right so you are basically running

play06:39

multiple operating system on this

play06:41

same hardware the same physical hardware

play06:43

so you're wasting resources okay but

play06:45

necessary sauce you're wasting CPU

play06:46

you're wasting Ram you are wasting

play06:48

harddrive you are wasting all the

play06:49

resources this the next issue is with

play06:52

the licenses what if the OS which are

play06:53

using is Windows OS so of course you

play06:55

have to buy those licenses or even if

play06:58

you are using appropriate with index

play06:59

based OS you have to buy licenses for

play07:01

license for that so we don't want to

play07:04

invest at of that much of money so we

play07:06

got a concept of containers no thanks to

play07:08

Linux containers which is lxv we can

play07:11

have a container systems

play07:12

now what continuous are is think about

play07:15

containers as hypervisors the only

play07:17

differences in containers we don't

play07:19

install Newars so all the containers

play07:21

will share the same they will share the

play07:23

same OS cardinal and that's beauty right

play07:25

so on the hardware you will be having OS

play07:28

on that always will be installing docker

play07:29

not hypervisor docker and on this docker

play07:32

you can have multiple containers and

play07:34

each container can run its own

play07:36

application the full-fledged application

play07:37

your application dependencies everything

play07:40

that that's awesome right so that's the

play07:42

concept of containers now this container

play07:44

can be created with the help of images

play07:45

now go back to the example as a

play07:47

developer you will be having a physical

play07:49

hardware on that hardware you will be

play07:51

installing an OS on that OS will be

play07:52

installing dock and on docker you can

play07:54

create containers now once you build

play07:56

into the application you just have to

play07:58

pack the application that you have to

play08:00

pack the container now when you pack a

play08:02

container it will create a image now

play08:05

this image goes to the tester they can

play08:06

create multiple containers they can

play08:08

create multiple instances and each is

play08:10

just we can call it as containers again

play08:12

the same concept imagine image as as a

play08:16

class and if you have multiple

play08:17

containers as objects and if you create

play08:19

two container of the same image they

play08:20

will behave in the same way okay because

play08:22

they are the containers there are these

play08:24

juices of the same image so now when

play08:26

testing team has this they can again

play08:27

they can do testing and then when this

play08:29

ship when this ship this product to the

play08:30

production server again they will again

play08:33

give the image and on the person's away

play08:34

you can run containers and container

play08:36

will have everything they just need a

play08:37

docker system there and it can run the

play08:39

application now the beauty is you can

play08:42

create your own container so let's say

play08:44

if I want to teach the spring framework

play08:45

to someone and or maybe I want to

play08:48

demonstrate some tool so of course they

play08:50

don't have to install the software so

play08:51

what I can do is on my machine I will

play08:53

install

play08:53

docker and I can create container with

play08:55

multiple libraries and Spring Framework

play08:58

and then I can give them the container

play09:00

the image now they can run the image on

play09:02

their machine on their taco right so we

play09:04

can also share the images and that's why

play09:06

if you go to the public repository of

play09:08

docker they will have all the they were

play09:11

had they have most of the repositories

play09:13

they have most of the images so you can

play09:15

use those images example they have image

play09:17

for for ladies they have image for Noah

play09:19

so they have image for the window as

play09:21

well so if you want to run to this

play09:23

application just use docker pull the

play09:25

image run it on your machine and you can

play09:28

you can get started right that's the

play09:30

people test the beauty now come back

play09:31

coming back blocker the docker is a

play09:33

ecosystem as I mentioned in docker we

play09:35

have so many things to talk about we can

play09:36

talk about chocolate hubs so the deposit

play09:38

ways which I'll talk about talking about

play09:40

it was a docker hub then we have a

play09:42

concept of docker engine so you know we

play09:44

have a client-server architecture where

play09:45

we have a server when you have a client

play09:47

of course we can talk talk about those

play09:49

things in detail it's not a small topic

play09:50

you talk about right so it has so many

play09:53

things involved inside docker so doctor

play09:56

is also a company now when you say you

play09:57

work with docker so that's a company

play09:58

they are talking in fact doctor also has

play10:00

an enterprise version so they have a

play10:01

community version they have Enterprise

play10:03

version committee was is open source and

play10:06

they have named it mobi and their the

play10:08

Enterprise version as well the feature

play10:10

is almost same it's just that for the

play10:11

enterprise version they provide support

play10:13

so that's the introduction of dropper

play10:15

let me know if you if you want to know

play10:17

some more concepts about this I can make

play10:19

a series on talk anyway we are going to

play10:21

use this concept in high polish of

play10:23

fabric goes so yeah that's it that's

play10:26

about docker so I hope you enjoyed this

play10:27

video write me in the comment section

play10:28

and use it for the videos

Rate This

5.0 / 5 (0 votes)

Étiquettes Connexes
DockerContainersDevelopmentTestingDeploymentSoftwareVirtual MachinesDependenciesFrameworksOS
Besoin d'un résumé en anglais ?