L08-Basics of Containerization
L08-Basics of Containerization
L08-Basics of Containerization
Software Architectures
FOUNDATION MODULE 3: VIRTUALIZATION
L08 – Basics of
Containerization
Confidential Document
talentsprint.com
Topic
1. Container
2. Containers and Images Foundation
3. Hypervisor vs Container
4. Container Building Tools
5. Introduction to Docker
6. Docker Architecture
7. Container Lifecycle
8. First Docker Run
9. Docker Build for Micronaut application
○ Different steps
10. Docker Volume & Network
11. Container Orchestration
© Copyright, TalentSprint
12. Commands Cheat sheet
2
Container
Definition:
Benefits:
● Technology details of the container is hidden
● Polyglot application
© Copyright, TalentSprint
● Isolation
OCI https://opencontainers.org/
3
Container & Image Foundation
Image Read Only Layers
Image
Image is a prototype
Definition of required environment
● Portable
● Layered
● Architecture- Layers of file system
● Divided into chunks
Container
Container
© Copyright, TalentSprint
● Each container has a writable layer
● Image Layer is common and shared
across
4
Hypervisor vs Container
© Copyright, TalentSprint
Container Building Tools
● Docker
● Kaniko: Backed by google; released in 2018
● Buildah: Backed by RedHat; released in 2018
© Copyright, TalentSprint
6
Docker
What is a Docker?
Platform
Create, Run, Manage & Share Containers
© Copyright, TalentSprint
7
Docker Architecture
© Copyright, TalentSprint
Container Lifecycle
© Copyright, TalentSprint
First Docker Run
© Copyright, TalentSprint
10
Docker From a Micronaut Application
© Copyright, TalentSprint
11
Docker Volume
Creating storage while running a container with –v/ --
mount option:
© Copyright, TalentSprint
• docker create volume –name <name>
12
Docker Network
Requirements of network
Container Network Module Design (CNM)
Types of Networks
https://www.docker.com/blog/understanding-
docker-networking-drivers-use-cases/
© Copyright, TalentSprint
13
Container Orchestrations
© Copyright, TalentSprint
● Keeping interactions between containers secure
14
Container Orchestrations Tools
• Kubernetes K8S
• Red Hat OpenShift
• Apache Mesos
• GKE
© Copyright, TalentSprint
15
Command Cheat Sheet
● Command images:
● docker container ls : to get all list of running containers
● docker images : to list out all images available
● docker container ls –all/ -a : to list all containers
● docker images –digest
● docker ps: alternative of docker container ls
● docker images --help
● docker ps –all – filter “exited=0” : to list stopped
● Command image: containers
● docker image ls ● docker stop <Container Name>: to stop running
● docker pull name[:tag] container
● docker inspect <image> : to get JSON details ● docker rm <Container Name> : to delete the container
● docker image push : push built image to repo ● docker inspect <Container Name>
● docker image build ● docker logs <Container Name>
● docker image history <image name> : to get history ● docker ports <Container Name>
about the image ● docker diff <Container Name>
● docker rmi <image name/ hexcode> : to remove an ● docker commit <containerId> <image name> // running
© Copyright, TalentSprint
image container to a image
16
Thank You
talentsprint.com