Hello, and welcome to this section
on containers where we'll be talking about Docker,
ECS and EKS.
So what is Docker?
Docker is a software development platform to deploy apps.
The idea is that it's a container technology.
So apps are going to be packaged into containers
and these containers are sort of standardized.
And so they can be run on any operating system.
That means that your apps, once they're containerized
they run the same way, regardless of where they run.
It could be any machine.
You don't have any compatibility issue.
The behavior is predictable, which means
that you have less work to do.
It's easier to maintain and deploy
and it should work with any kind of language
any operating system and any technology.
So the use cases for Docker are a microservice architecture.
So this is a good keyword to have in mind.
Lift and chip apps from on premises to the cloud.
And anytime you wanna run a container, really.
So how does Docker work on an operating system?
Well, we have a server and
in our case it may be EC2 Instances
but it could be any kind
of server and you're going to run a Docker agent.
And then from there you can start Docker containers.
And so your first Docker container may contain
a Java application.
And your second Docker container may contain a
node JS application and Docker containers
they can run multiple times the same.
So you can have multiple Docker containers
of the same Java application or multiple Docker containers
of the same node JS application.
You can also run databases within Docker, for example
My SQL and so on.
So Docker is very versatile.
And from a server perspective
all these things are Docker containers.
So where do you store Docker images?
Well you store them
in something called a Docker Repository.
Okay, we have multiple options.
The first one is Docker Hub
and so it's a public repository
and you can find base images for many technologies
or operating systems such as Ubuntu, MySQL and so on.
It's very popular.
And then for more private integration
you have Amazon ECR, Amazon Elastic Container Registry
and you can run your private images on there
but there's also a public repository option available
on ECR called the Amazon ECR Public Gallery.
Now, how is Docker different from a virtual machine?
Well, Docker is sort of a virtualization technology
but not exactly,
the purists will try to hit me if I say this,
so the resources are shared with a host.
That means that you can share many containers on one server.
So if you look
at the architecture for a VM, you have the infrastructure
then you have the host operating system
then you have a hypervisor
and then you have your apps and your guest operating system.
And so this is how, for example, EC2 works,
for example, when you get an EC2 machine
it is actually a virtual machine running on a hypervisor.
And so this allows Amazon to offer many EC2 instances
to many different type of customers
and all these EC2 instances
all these virtual machines are going to be separate.
They're not going to share resources
and they're going to be isolated, but for a Docker container
you still have the infrastructure and the host OS
which may be this time an EC2 instance
then you have the Docker Daemon
and then on top of it, you can have a lot
of containers that can be lightweight running
on top of the Docker Daemon.
And this allows the containers to really
cohabitate together.
They can actually share networking
share some data and so on.
So it's a bit less quote unquote,
secure as a virtual machine,
but it allows you to run more containers on a single server.
And this is why we really like Docker containers.
So how do you get started with Docker?
Well, first you have to write a Docker file,
which is defining how your Docker container will look.
So we have a base Docker image
and we add some files and then we're going to build it.
And this will become a Docker image.
And that Docker image,
you can store it on a Docker repository
it's called a Push and you push it to either Docker hub
which is a public repository, or Amazon is ECR
which is Amazon's version of Docker repositories.
Then you can pull back these images
from these repositories and then you would run them.
And when you run a Docker image
it becomes a Docker container, which runs your code
that you had built from your Docker build.
That is the whole process with Docker.
So how do you do Docker container management on AWS?
Well, the first one is called Amazon ECS.
It's Amazon Elastic Container Service.
It's the own platform of Amazon for Docker management.
We'll have a look at it in deep dive.
Then we have Amazon EKS
which is Amazon Elastic Kubernetes Service
which is Amazon's managed version of Kubernetes
which is an open source project.
We'll have a quick look at it.
We have AWS Fargate
which is Amazon's own serverless container platform.
And Fargate works both with ECS and EKS
and we'll do a deep dive of Fargate in this section.
And then we have Amazon ECR used to store container images
as I showed you from before.
So we have an overview of how to do Docker
and what is Docker and how to do Docker in AWS.
Now let's do a deep dive onto Amazon ECS and the rest.