SlideShare a Scribd company logo
3
Most read
8
Most read
10
Most read
Introduction to Docker
and OCI
March 2021
Romain Schlick
@r_schlick
Summary
 Virtual machines VS containers
 Containers
 What is Docker ?
 LXC vs Docker
 Docker basic concepts
 The Open Container Initiative (OCI)
 Runtime containers
 OCI Containers images
 Write a Docker File
 Build an image with Docker
 Docker Compose
 Images Registry
 Docker Engine
 Run a container with Docker
Virtual Machines VS Containers
One host OS
Smaller, faster, easy to scale.
Many guest OS
Bigger, slower, harder to
scale.
Containers
 See containers like an app in an isolated box
 Resources managed: size, cpu, memory, file system, network, etc.
 Standard based on LXC (Linux Container) and Windows Container
 Kernel namespaces (ipc, uts, mount, pid, network, user) : what you can see
 Apparmor, SELinux (security)
 Cgroups: limits what you can use and isolates resource usage
 chroots
 Solve problem « it’s work on my computer ! »
 Enables automatization, CI/CD, Scaling
 Cost optimization
 Microservices approach
What is Docker ?
 Version 1.0 in 2014
 Goal: Friendly and easy use of LXC containers
 Tools for developers to build containers
 Tools for operators to run containers
 Define new standard of image containers, image distribution, containers
runtime
 Container != Docker
 Docker Engine = Client/Server architecture
LXC vs Docker
Docker basic concepts
 Image: Static, persisted container image
 Container: Image-instance running an app process
 Registry: Stores many static images
The Open Container Initiative
 Formed in 2015 by Docker
 The OCI define industry standards around container image formats and runtime
 Docker image format has become OCI Image Specification
 Docker, BuildKit, Kaniko, Buildah
 Docker Registry protocol has become OCI Distribution Spec
 Docker runtime has become OCI Runtime Specification (CRI)
 Low-level and high-level runtime containers
 runc, Kata containers, gVisor, Firecracker
 Podman, containerd, rkt, cri-o
 Container Network Interface (CNI): Defines how connectivity among containers
Runtime containers
Docker
runc
containerd
OCI Containers Images
 A container image is a static representation of the app and its configuration
 To run the app, an image is instantiated to create a container
 To build container images with Docker: write a Dockerfile
 Container images are versioned
 OCI images are layers assembly (see them like pieces of file system)
 Layers are mounted together by an union filesystem (overlayFS)
 Layers are immutables (copy-on-write)
Dockerfile
 A text document that contains commands to
assemble an image
 Must begin with a FROM instruction
 Build cache mecanism
 Commands :
 docker build –t image/name:1.0 .
 docker history image/name:1.0
 Nodejs app Dockerfile example
Dockerfile cheat sheet
 Docker use a cache system with a hash for each step
 Each hash identify the file system of an intermediate container
 docker history to see each layers of the image
Docker build image
Docker history
Docker build
Docker Compose
 Tool for defining and running multi-
container Docker apps
 YAML file to configure app services
 Used for devs and automated testing
environments, not production
 Example with Wordpress + Mysql
 Commands:
 docker-compose run
 docker-compose up
 docker-compose stop
 docker-compose config
Images Registry
 Images are stored in a Registry
 Docker Registry HTTP API V2 protocol
 OCI Distribution specification
 Docker public registry : Docker Hub (hub.docker.com)
 Docker Hub contains all officials images (ubuntu, mysql, pyton, java, etc.)
 Docker commands :
 docker images
 docker pull
 docker login my.registry.url
 docker tag image/name:1.0 my.registry.url/image/name:1.0
 docker push
Docker Engine
 Complete Tools box
 Daemon controlled by REST API
 CLI Docker client
 Manages containers, images, builds,
etc.
 Enterprise edition with more features
Run a container with Docker
 A container image becomes a container when « docker run » is executed
 Commands:
 Run container: docker run -d -p 27017:27017 --name mongodb mongo:latest
 Connect to container: docker exec -it mongodb bash
 Start/Stop/delete container: docker start/stop/rm mongodb
 Show container logs: docker logs mongodb
 List containers: docker ps
Docker Cheat Sheet

More Related Content

What's hot (20)

PDF
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요
Jo Hoon
 
PPTX
Getting started with Docker
Ravindu Fernando
 
PPTX
Kubernetes Basics
Rishabh Kumar
 
PPTX
Docker, LinuX Container
Araf Karsh Hamid
 
PPTX
Cloud Native: what is it? Why?
Juan Pablo Genovese
 
PDF
Docker Swarm 0.2.0
Docker, Inc.
 
PDF
Docker Containers Deep Dive
Will Kinard
 
PDF
[9월 런치 세미나] 도커와 쿠버네티스 기술에 스며들다
NAVER CLOUD PLATFORMㅣ네이버 클라우드 플랫폼
 
PPTX
Docker 101 - Nov 2016
Docker, Inc.
 
PDF
Docker introduction
Julien Maitrehenry
 
PDF
Docker presentation | Paris Docker Meetup
dotCloud
 
PDF
CI/CD with Openshift and Jenkins
Ari LiVigni
 
PPTX
The Basic Introduction of Open vSwitch
Te-Yen Liu
 
PPT
presentation on Docker
Virendra Ruhela
 
PPTX
HAProxy
Arindam Nayak
 
PDF
[오픈소스컨설팅]Docker기초 실습 교육 20181113_v3
Ji-Woong Choi
 
PDF
Docker Compose Explained
Shawn Sorichetti
 
PDF
Introduction to docker
Instruqt
 
ODP
Kubernetes Architecture
Knoldus Inc.
 
PDF
What Is Helm
AMELIAOLIVIA2
 
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요
Jo Hoon
 
Getting started with Docker
Ravindu Fernando
 
Kubernetes Basics
Rishabh Kumar
 
Docker, LinuX Container
Araf Karsh Hamid
 
Cloud Native: what is it? Why?
Juan Pablo Genovese
 
Docker Swarm 0.2.0
Docker, Inc.
 
Docker Containers Deep Dive
Will Kinard
 
[9월 런치 세미나] 도커와 쿠버네티스 기술에 스며들다
NAVER CLOUD PLATFORMㅣ네이버 클라우드 플랫폼
 
Docker 101 - Nov 2016
Docker, Inc.
 
Docker introduction
Julien Maitrehenry
 
Docker presentation | Paris Docker Meetup
dotCloud
 
CI/CD with Openshift and Jenkins
Ari LiVigni
 
The Basic Introduction of Open vSwitch
Te-Yen Liu
 
presentation on Docker
Virendra Ruhela
 
HAProxy
Arindam Nayak
 
[오픈소스컨설팅]Docker기초 실습 교육 20181113_v3
Ji-Woong Choi
 
Docker Compose Explained
Shawn Sorichetti
 
Introduction to docker
Instruqt
 
Kubernetes Architecture
Knoldus Inc.
 
What Is Helm
AMELIAOLIVIA2
 

Similar to Introduction to docker and oci (20)

PDF
Docker basics
Claudio Montoya
 
PPTX
Dockers and containers basics
Sourabh Saxena
 
PPTX
Docker.pptx
balaji257
 
PPTX
Introduction to Containers and Docker
Fayçal Bziou
 
PDF
Docker in practice
Geert Pante
 
PPTX
Building Distributed Systems without Docker, Using Docker Plumbing Projects -...
Patrick Chanezon
 
PDF
Diving Through The Layers: Investigating runc, containerd, and the Docker eng...
Phil Estes
 
PPSX
Docker and containers - Presentation Slides by Priyadarshini Anand
PRIYADARSHINI ANAND
 
PDF
Docker slides
Jyotsna Raghuraman
 
PPTX
Docker for .NET Developers
Taswar Bhatti
 
PDF
Docker interview Questions-2.pdf
Yogeshwaran R
 
PDF
Docker intro
Frei Zhang
 
ODP
Docker slide
tarik abarghaz
 
PPTX
Accelerate your development with Docker
Andrey Hristov
 
PDF
Accelerate your software development with Docker
Andrey Hristov
 
PDF
Docker
Mayank Patel
 
PPTX
Introduction to Dockers.pptx
HassanRaza40719
 
PPTX
Learning Dockers - Step by Step
Adnan Siddiqi
 
PDF
containers and virtualization tools ( Docker )
Imo Inyang
 
PPTX
Docker presentation
Layani Malsha
 
Docker basics
Claudio Montoya
 
Dockers and containers basics
Sourabh Saxena
 
Docker.pptx
balaji257
 
Introduction to Containers and Docker
Fayçal Bziou
 
Docker in practice
Geert Pante
 
Building Distributed Systems without Docker, Using Docker Plumbing Projects -...
Patrick Chanezon
 
Diving Through The Layers: Investigating runc, containerd, and the Docker eng...
Phil Estes
 
Docker and containers - Presentation Slides by Priyadarshini Anand
PRIYADARSHINI ANAND
 
Docker slides
Jyotsna Raghuraman
 
Docker for .NET Developers
Taswar Bhatti
 
Docker interview Questions-2.pdf
Yogeshwaran R
 
Docker intro
Frei Zhang
 
Docker slide
tarik abarghaz
 
Accelerate your development with Docker
Andrey Hristov
 
Accelerate your software development with Docker
Andrey Hristov
 
Docker
Mayank Patel
 
Introduction to Dockers.pptx
HassanRaza40719
 
Learning Dockers - Step by Step
Adnan Siddiqi
 
containers and virtualization tools ( Docker )
Imo Inyang
 
Docker presentation
Layani Malsha
 
Ad

Recently uploaded (20)

PDF
Reasons for the succes of MENARD PRESSUREMETER.pdf
majdiamz
 
PDF
Introduction to Productivity and Quality
মোঃ ফুরকান উদ্দিন জুয়েল
 
PPTX
VITEEE 2026 Exam Details , Important Dates
SonaliSingh127098
 
PPT
PPT2_Metal formingMECHANICALENGINEEIRNG .ppt
Praveen Kumar
 
PPTX
Evaluation and thermal analysis of shell and tube heat exchanger as per requi...
shahveer210504
 
PDF
MAD Unit - 2 Activity and Fragment Management in Android (Diploma IT)
JappanMavani
 
PPTX
Hashing Introduction , hash functions and techniques
sailajam21
 
PPTX
Depth First Search Algorithm in 🧠 DFS in Artificial Intelligence (AI)
rafeeqshaik212002
 
PPTX
Day2 B2 Best.pptx
helenjenefa1
 
PPTX
美国电子版毕业证南卡罗莱纳大学上州分校水印成绩单USC学费发票定做学位证书编号怎么查
Taqyea
 
PDF
Pressure Measurement training for engineers and Technicians
AIESOLUTIONS
 
DOCX
8th International Conference on Electrical Engineering (ELEN 2025)
elelijjournal653
 
PPTX
Thermal runway and thermal stability.pptx
godow93766
 
PDF
Basic_Concepts_in_Clinical_Biochemistry_2018كيمياء_عملي.pdf
AdelLoin
 
PPTX
GitOps_Repo_Structure for begeinner(Scaffolindg)
DanialHabibi2
 
PPTX
原版一样(Acadia毕业证书)加拿大阿卡迪亚大学毕业证办理方法
Taqyea
 
PDF
Biomechanics of Gait: Engineering Solutions for Rehabilitation (www.kiu.ac.ug)
publication11
 
PPTX
artificial intelligence applications in Geomatics
NawrasShatnawi1
 
PPTX
Solar Thermal Energy System Seminar.pptx
Gpc Purapuza
 
PPTX
Product Development & DevelopmentLecture02.pptx
zeeshanwazir2
 
Reasons for the succes of MENARD PRESSUREMETER.pdf
majdiamz
 
Introduction to Productivity and Quality
মোঃ ফুরকান উদ্দিন জুয়েল
 
VITEEE 2026 Exam Details , Important Dates
SonaliSingh127098
 
PPT2_Metal formingMECHANICALENGINEEIRNG .ppt
Praveen Kumar
 
Evaluation and thermal analysis of shell and tube heat exchanger as per requi...
shahveer210504
 
MAD Unit - 2 Activity and Fragment Management in Android (Diploma IT)
JappanMavani
 
Hashing Introduction , hash functions and techniques
sailajam21
 
Depth First Search Algorithm in 🧠 DFS in Artificial Intelligence (AI)
rafeeqshaik212002
 
Day2 B2 Best.pptx
helenjenefa1
 
美国电子版毕业证南卡罗莱纳大学上州分校水印成绩单USC学费发票定做学位证书编号怎么查
Taqyea
 
Pressure Measurement training for engineers and Technicians
AIESOLUTIONS
 
8th International Conference on Electrical Engineering (ELEN 2025)
elelijjournal653
 
Thermal runway and thermal stability.pptx
godow93766
 
Basic_Concepts_in_Clinical_Biochemistry_2018كيمياء_عملي.pdf
AdelLoin
 
GitOps_Repo_Structure for begeinner(Scaffolindg)
DanialHabibi2
 
原版一样(Acadia毕业证书)加拿大阿卡迪亚大学毕业证办理方法
Taqyea
 
Biomechanics of Gait: Engineering Solutions for Rehabilitation (www.kiu.ac.ug)
publication11
 
artificial intelligence applications in Geomatics
NawrasShatnawi1
 
Solar Thermal Energy System Seminar.pptx
Gpc Purapuza
 
Product Development & DevelopmentLecture02.pptx
zeeshanwazir2
 
Ad

Introduction to docker and oci

  • 1. Introduction to Docker and OCI March 2021 Romain Schlick @r_schlick
  • 2. Summary  Virtual machines VS containers  Containers  What is Docker ?  LXC vs Docker  Docker basic concepts  The Open Container Initiative (OCI)  Runtime containers  OCI Containers images  Write a Docker File  Build an image with Docker  Docker Compose  Images Registry  Docker Engine  Run a container with Docker
  • 3. Virtual Machines VS Containers One host OS Smaller, faster, easy to scale. Many guest OS Bigger, slower, harder to scale.
  • 4. Containers  See containers like an app in an isolated box  Resources managed: size, cpu, memory, file system, network, etc.  Standard based on LXC (Linux Container) and Windows Container  Kernel namespaces (ipc, uts, mount, pid, network, user) : what you can see  Apparmor, SELinux (security)  Cgroups: limits what you can use and isolates resource usage  chroots  Solve problem « it’s work on my computer ! »  Enables automatization, CI/CD, Scaling  Cost optimization  Microservices approach
  • 5. What is Docker ?  Version 1.0 in 2014  Goal: Friendly and easy use of LXC containers  Tools for developers to build containers  Tools for operators to run containers  Define new standard of image containers, image distribution, containers runtime  Container != Docker  Docker Engine = Client/Server architecture
  • 7. Docker basic concepts  Image: Static, persisted container image  Container: Image-instance running an app process  Registry: Stores many static images
  • 8. The Open Container Initiative  Formed in 2015 by Docker  The OCI define industry standards around container image formats and runtime  Docker image format has become OCI Image Specification  Docker, BuildKit, Kaniko, Buildah  Docker Registry protocol has become OCI Distribution Spec  Docker runtime has become OCI Runtime Specification (CRI)  Low-level and high-level runtime containers  runc, Kata containers, gVisor, Firecracker  Podman, containerd, rkt, cri-o  Container Network Interface (CNI): Defines how connectivity among containers
  • 10. OCI Containers Images  A container image is a static representation of the app and its configuration  To run the app, an image is instantiated to create a container  To build container images with Docker: write a Dockerfile  Container images are versioned  OCI images are layers assembly (see them like pieces of file system)  Layers are mounted together by an union filesystem (overlayFS)  Layers are immutables (copy-on-write)
  • 11. Dockerfile  A text document that contains commands to assemble an image  Must begin with a FROM instruction  Build cache mecanism  Commands :  docker build –t image/name:1.0 .  docker history image/name:1.0  Nodejs app Dockerfile example
  • 13.  Docker use a cache system with a hash for each step  Each hash identify the file system of an intermediate container  docker history to see each layers of the image Docker build image Docker history Docker build
  • 14. Docker Compose  Tool for defining and running multi- container Docker apps  YAML file to configure app services  Used for devs and automated testing environments, not production  Example with Wordpress + Mysql  Commands:  docker-compose run  docker-compose up  docker-compose stop  docker-compose config
  • 15. Images Registry  Images are stored in a Registry  Docker Registry HTTP API V2 protocol  OCI Distribution specification  Docker public registry : Docker Hub (hub.docker.com)  Docker Hub contains all officials images (ubuntu, mysql, pyton, java, etc.)  Docker commands :  docker images  docker pull  docker login my.registry.url  docker tag image/name:1.0 my.registry.url/image/name:1.0  docker push
  • 16. Docker Engine  Complete Tools box  Daemon controlled by REST API  CLI Docker client  Manages containers, images, builds, etc.  Enterprise edition with more features
  • 17. Run a container with Docker  A container image becomes a container when « docker run » is executed  Commands:  Run container: docker run -d -p 27017:27017 --name mongodb mongo:latest  Connect to container: docker exec -it mongodb bash  Start/Stop/delete container: docker start/stop/rm mongodb  Show container logs: docker logs mongodb  List containers: docker ps

Editor's Notes

  • #4: VMs : VMs help reduce expenses. Instead of running an application on a single server, a virtual machine enables utilizing one physical resource to do the job of many. Containers: Containers help reduce expenses as well and they are remarkably lightweight and fast to launch.  Because of their small size, you can quickly scale in and out of containers