You are on page 1of 14

Docker

• What is Docker?
• Why do we use Docker?
Software Installation Download Installer

Run Installer

Some error message

Troubleshoot
# docker run -it redis

Re-run Installer

Another error
Docker Ecosystem

Docker Client Docker Server

Docker is a platform or
Docker ecosystem around creating
Docker Images
Machine and running containers

Docker
Docker Hub
Compose
What is a container?

Container

Image Container

Single file with all


the dependencies
and config required Container
to run a program
• Instance of an image
• A running program
PC/laptop Docker Hub

# docker run hello-world Docker Client A single file with everything needed
Redis to run one specific program

Docker Server
Hello-world
Image cache

Image X

Image Y

Image Z
A quick review on OS…

Chrome Terminal NodeJS Process running on the computer

Running program issues request to kernel


System call System call System call to interact with a piece of hardware

Kernel

CPU Memory Hard Disk


Need Python 2 Need Python 3

Chrome Terminal NodeJS

System call System call System call

Kernal

Hard Disk
Python 2
Need Python 2 Need Python 3

Chrome Terminal NodeJS

System call to
System call System call
access HDD

Which process is making


Kernel this system call?

Hard Disk

Segment on Segment on
hard disk for Python 2 Python 3 hard disk for
chrome NodeJS
Processes Hard disk Network

Namespacing
Isolating resources per Users Hostnames Inter process
process or group of
processes
communication

Memory CPU HD I/O

Control Groups
Limit amount of resources
Network
used per process Bandwidth
Container

Container is not a physical


construct but grouping of resources
Chrome Terminal NodeJS

System call to
System call System call
access HDD

Which process is making


Kernel this system call

Hard Disk

Python 2 Python 3
Container

Chrome

System call to
access HDD

Kernel

Hard Disk Network


Portion of each
resource made
RAM CPU available to
process
Container

Image
File system Startup
Chrome snapshot command

Chrome Python # Run Chrome

System call to
access HDD

Kernel

Hard Disk Network


Portion of each
resource made
RAM CPU available to
process
Container

Image
File system Startup
Running
Process snapshot command

Chrome Python # Run Chrome

System call to
access HDD

Kernel

Hard Disk Chrome

RAM CPU Network

You might also like