(CC - 23) Lab 4
(CC - 23) Lab 4
Lab 4
Agenda
• What Docker?
• Why Docker?
• Virtual machines VS Containers
• Architecture of Docker
• Basic Docker commands
• Demo
• Hands-on
Quick Recap
Operating System:
• An operating system (OS) is system software that manages
computer hardware, software resources, and provides
common services for computer programs.
Quick Recap
Kernel:
• Portion of the OS code that is always resident in
memory.
• Facilitates interactions between hardware and
software components.
Problem
Can we do Detailed
better?
i.e.
Hypervisor - VirtualBox
- VMWare
- Windows Hyper-v
Hypervisor
Detailed
Container i.e.
Runtime - Docker
- runC
- Containerd
- Windows
Containers
Detailed
Docker
Engine
Host OS
Docker Engine:
• One of the core components of Docker.
• Responsible for the overall functioning of the Docker platform.
• A client-server based application.
• Consists of 3 main components:
▪ Server Client Server
▪ REST API
▪ Client REST API
Process
Container
Share
Operating System OS
Kernel
Docker Architecture
Examples:
$ docker version
$ docker info
$ docker run
Docker Command
docker version
docker version
docker info
Shows most
configuration values of
engine.
Docker Management Command
Examples:
$ docker run docker container run
$ docker build docker image build
$ docker ps docker container ls
Docker Terminology
• Docker Container
▪An instance of the docker image running as a
process.
▪You can have many containers running off the
same image.
Docker Container
Docker Terminology
• Docker Hub
▪Docker’s default image registry.
▪The official online repository that contains Docker Images
that are available to use.
▪Allows you to store and distribute your custom images
publicly or privately, as required.
Docker Components Workflow
Docker Management Command
docker container run --publish 80:80 nginx
docker container ls
List containers.
docker container rm
Remove one or more containers.
Docker Management Command
DEMO
Demo: Create and Use Containers