My Notes Based on Ajeet Raina's Lecture

Historical Context of Application Architecture Transformations

Around the year 2000, we dealt with monolithic applications. These were typically built on .NET or Java, where deployment was done on a single server.

How It Is Now

Applications are deployed continuously. Newer versions of certain parts of the application are deployed more frequently. Applications are built from loosely coupled components. A component is also called a service, also known as a microservice. Docker can be deployed across multiple servers.

Application architecture and components are more distributed. This introduces a certain dependency. If you have a distributed, complex stack that operates on a more complex hardware stack.

Ajeet provides an analogy, saying that the logistics industry solved this problem long ago—deciding what, where, and how things should be packed and shipped to the destination.

Docker introduces standardization in the way applications are deployed.

What is Docker?

According to Ajeet, Docker is something between a Virtualization tool and a Configuration Manager. Docker is between Manual Configuration and Traditional VMs.

What is Docker?

Docker Containers Are Not Virtual Machines

Similarities Between Docker and VM

VMdocker
A process in one VM doesn’t see the process in another VMA process in one container doesn’t see processes in another container
Each VM has its own core filesystemEach container has its own core filesystem
A VM is a running instance from a .VMX or .VMDK fileDocker containers are a running instance from a Docker image
Host OS can be different from guest OSHost OS can be different from container OS

Differences Between Docker and VM

VMdocker
Each VM runs its own operating systemAll containers share the same system kernel
Booting a system takes minutesContainer initialization takes seconds
Snapshots are used sporadically in VMsImages are built incrementally, layer by layer
No version control. No distinction between versionsImages can be version-controlled. Docker Hub works like GitHub
Multiple VMs cannot run simultaneously on one laptopMultiple containers can run on one laptop
Only one virtual machine can run from a single .VMX or .VMDK fileMultiple containers can be launched from one image

Docker Terminology

Docker Image - the foundation of a Docker container. Represents the entire application.

Docker Container - the basic unit in which application services reside and execute.

Docker Engine - creates, deploys, and runs Docker containers.

Registry Service (Docker Hub) - a cloud or server-based service for storing and distributing images.

Basic Commands

To download a Docker image:

docker pull perfringis/my_image

To list Docker images:

docker image ls

To run a container:

docker container run -d -p 5000:5000 --name container_name perfringis/my_image

To stop a running container:

docker container stop container_name

Source

The notes were created based on the recording: Recording