The document provides an overview of Docker fundamentals, including what Docker is, its architecture, common operations, and advantages. It begins by explaining that Docker is a container technology that packages code and dependencies together. Containers run atop the same OS kernel and utilize fewer system resources than virtual machines. The document then describes Docker's client-server architecture and underlying technologies like namespaces and cgroups that enable isolation. It also outlines common Docker commands and explains that Dockerfiles define container configurations.
2. Agenda
● What is OS Kernel?
● What is Virtual Machine(VM)?
● What is Docker?
● Docker Architecture
● Common Docker Operations
● What is Dockerfile
● Docker Advantages
3. What is OS
Kernel?
● Kernel is core part of Operating
system.
● Kernel controls everything in the
system.
● First program which is loaded
by Bootloader during the
system startup.
● Core Functionalities include:
○ Memory Management
○ Process Management
○ Input/Output
Management
Reference:
https://en.wikipedia.org/wiki/Kernel_(operating_system)
4. What is Virtual
Machine(VM)?
● VM is abstraction of physical
hardware.
● Abstraction is provided by piece
of software called Hypervisor.
● Each VM include the fully copy
of the corresponding Operating
System along with necessary
binaries and libraries.
● Scalable and Flexible than their
physical counterparts.
● Low performance than their
physical counterparts.
Reference:
https://www.packtpub.com/books/content/working-virtual-mac
hines
5. What is Docker?
● Docker is container technology.
● Containers are abstraction at
the app layer.
● Containers, packages code and
dependencies together.
● Different containers running on
the same machine, shares the
same OS kernel.
● Utilizes less system resources
compared to VM.
● Starts almost instantly.
Reference: https://www.docker.com/what-container
Docker Containers Virtual Machine
6. Docker
Architecture
● Docker Client: Provides API and CLI to
interact with docker
● Docker Daemon/Engine: Listens for
Docker API requests and manages
docker objects. (images, network,
storage, containers)
● Docker Registry: It stores docker
images.
Reference:
https://docs.docker.com/engine/docker-overview/#docker-architecture
7. Docker
Architecture
● Containerd: Industry standard
container runtime. It manages
the lifecycle from image to
container, execution,
supervision and networking.
● RunC: It is used by Containerd
for spawning and running
containers.
● Container-shim: Manages
headless containers. Once
initialized, RunC passes the
container handling to shim.
8. Docker Architecture – Underlying Technologies
● Kernel Namespaces: Docker uses it to provide process, network, filesystem,
etc isolation for each container.
● Kernel Control Groups: Docker uses it to enforce limit and constraints on
hardware resources. ( memory, cpu, i/o)
● Union Filesystem: Docker uses union filesystem for containers as it
lightweight and fast. (supports layering and CoW)
● Container Format: Docker combines namespaces, cgroups and UnionFS
into format called container format.
9. Docker Common CLI Operations
● Pulling and Listing Docker image
● Running and Listing Docker containers
● Stopping container and Removing Docker Container
● Mapping Host port with Docker container
● Mounting Host Directory/File on Docker container
● Checking Docker Container Logs
● Login into Docker Container
● Removing Docker Container Image
● Pushing to Docker Registry
11. Docker Advantages
● Lightweight, Open and Secure
● Portable and efficient in comparison to VM
● Accelerates Developer Onboarding
● Empower Developer Creativity
● Eliminates Environmental Inconsistencies
● Ability to scale quickly
● Reduces time to market