SlideShare a Scribd company logo
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

Docker in real life
Docker in real lifeDocker in real life
Docker in real life
Nguyen Van Vuong
 
Docker & Kubernetes intro
Docker & Kubernetes introDocker & Kubernetes intro
Docker & Kubernetes intro
Arnon Rotem-Gal-Oz
 
Easy Docker on Microsoft Azure
Easy Docker on Microsoft AzureEasy Docker on Microsoft Azure
Easy Docker on Microsoft AzureDocker, Inc.
 
Docker 101: An Introduction
Docker 101: An IntroductionDocker 101: An Introduction
Docker 101: An Introduction
POSSCON
 
Docker Compose | Docker Compose Tutorial | Docker Tutorial For Beginners | De...
Docker Compose | Docker Compose Tutorial | Docker Tutorial For Beginners | De...Docker Compose | Docker Compose Tutorial | Docker Tutorial For Beginners | De...
Docker Compose | Docker Compose Tutorial | Docker Tutorial For Beginners | De...
Simplilearn
 
Dockerizing your applications - Docker workshop @Twitter
Dockerizing your applications - Docker workshop @TwitterDockerizing your applications - Docker workshop @Twitter
Dockerizing your applications - Docker workshop @Twitter
dotCloud
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
MANAOUIL Karim
 
Introduction of Docker and Docker Compose
Introduction of Docker and Docker ComposeIntroduction of Docker and Docker Compose
Introduction of Docker and Docker Compose
Dr. Ketan Parmar
 
Introdution to Docker (theory and hands on) dbCafé - dbTrento
Introdution to Docker (theory and hands on) dbCafé - dbTrentoIntrodution to Docker (theory and hands on) dbCafé - dbTrento
Introdution to Docker (theory and hands on) dbCafé - dbTrento
Cristian Consonni
 
Docker Container-Introduction and Features
Docker Container-Introduction and FeaturesDocker Container-Introduction and Features
Docker Container-Introduction and Features
Ashnikbiz
 
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
dotCloud
 
Introduction to Docker - What is it and how is it compared to VM's
Introduction to Docker - What is it and how is it compared to VM'sIntroduction to Docker - What is it and how is it compared to VM's
Introduction to Docker - What is it and how is it compared to VM's
Jeremy Haas
 
Docker Basics
Docker BasicsDocker Basics
Docker Basics
DuckDuckGo
 
Dockerizing development workflow
Dockerizing development workflowDockerizing development workflow
Dockerizing development workflow
Orest Ivasiv
 
Vagrant or docker for java dev environment
Vagrant or docker for java dev environmentVagrant or docker for java dev environment
Vagrant or docker for java dev environment
Orest Ivasiv
 
Introduction to Docker Compose | Docker Intermediate Workshop
Introduction to Docker Compose | Docker Intermediate WorkshopIntroduction to Docker Compose | Docker Intermediate Workshop
Introduction to Docker Compose | Docker Intermediate Workshop
Ajeet Singh Raina
 
Docker
DockerDocker
DCA. certificate slide Session 1
DCA. certificate slide Session 1DCA. certificate slide Session 1
DCA. certificate slide Session 1
Hadi Tayanloo
 
presentation on Docker
presentation on Dockerpresentation on Docker
presentation on Docker
Virendra Ruhela
 
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
Introduction to Docker at SF Peninsula Software Development Meetup @GuidewireIntroduction to Docker at SF Peninsula Software Development Meetup @Guidewire
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
dotCloud
 

What's hot (20)

Docker in real life
Docker in real lifeDocker in real life
Docker in real life
 
Docker & Kubernetes intro
Docker & Kubernetes introDocker & Kubernetes intro
Docker & Kubernetes intro
 
Easy Docker on Microsoft Azure
Easy Docker on Microsoft AzureEasy Docker on Microsoft Azure
Easy Docker on Microsoft Azure
 
Docker 101: An Introduction
Docker 101: An IntroductionDocker 101: An Introduction
Docker 101: An Introduction
 
Docker Compose | Docker Compose Tutorial | Docker Tutorial For Beginners | De...
Docker Compose | Docker Compose Tutorial | Docker Tutorial For Beginners | De...Docker Compose | Docker Compose Tutorial | Docker Tutorial For Beginners | De...
Docker Compose | Docker Compose Tutorial | Docker Tutorial For Beginners | De...
 
Dockerizing your applications - Docker workshop @Twitter
Dockerizing your applications - Docker workshop @TwitterDockerizing your applications - Docker workshop @Twitter
Dockerizing your applications - Docker workshop @Twitter
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Introduction of Docker and Docker Compose
Introduction of Docker and Docker ComposeIntroduction of Docker and Docker Compose
Introduction of Docker and Docker Compose
 
Introdution to Docker (theory and hands on) dbCafé - dbTrento
Introdution to Docker (theory and hands on) dbCafé - dbTrentoIntrodution to Docker (theory and hands on) dbCafé - dbTrento
Introdution to Docker (theory and hands on) dbCafé - dbTrento
 
Docker Container-Introduction and Features
Docker Container-Introduction and FeaturesDocker Container-Introduction and Features
Docker Container-Introduction and Features
 
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
 
Introduction to Docker - What is it and how is it compared to VM's
Introduction to Docker - What is it and how is it compared to VM'sIntroduction to Docker - What is it and how is it compared to VM's
Introduction to Docker - What is it and how is it compared to VM's
 
Docker Basics
Docker BasicsDocker Basics
Docker Basics
 
Dockerizing development workflow
Dockerizing development workflowDockerizing development workflow
Dockerizing development workflow
 
Vagrant or docker for java dev environment
Vagrant or docker for java dev environmentVagrant or docker for java dev environment
Vagrant or docker for java dev environment
 
Introduction to Docker Compose | Docker Intermediate Workshop
Introduction to Docker Compose | Docker Intermediate WorkshopIntroduction to Docker Compose | Docker Intermediate Workshop
Introduction to Docker Compose | Docker Intermediate Workshop
 
Docker
DockerDocker
Docker
 
DCA. certificate slide Session 1
DCA. certificate slide Session 1DCA. certificate slide Session 1
DCA. certificate slide Session 1
 
presentation on Docker
presentation on Dockerpresentation on Docker
presentation on Docker
 
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
Introduction to Docker at SF Peninsula Software Development Meetup @GuidewireIntroduction to Docker at SF Peninsula Software Development Meetup @Guidewire
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
 

Similar to Introduction to docker and oci

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

Similar to Introduction to docker and oci (20)

Docker basics
Docker basicsDocker basics
Docker basics
 
Dockers and containers basics
Dockers and containers basicsDockers and containers basics
Dockers and containers basics
 
Docker.pptx
Docker.pptxDocker.pptx
Docker.pptx
 
Introduction to Containers and Docker
Introduction to Containers and DockerIntroduction to Containers and Docker
Introduction to Containers and Docker
 
Docker in practice
Docker in practiceDocker in practice
Docker in practice
 
Building Distributed Systems without Docker, Using Docker Plumbing Projects -...
Building Distributed Systems without Docker, Using Docker Plumbing Projects -...Building Distributed Systems without Docker, Using Docker Plumbing Projects -...
Building Distributed Systems without Docker, Using Docker Plumbing Projects -...
 
Diving Through The Layers: Investigating runc, containerd, and the Docker eng...
Diving Through The Layers: Investigating runc, containerd, and the Docker eng...Diving Through The Layers: Investigating runc, containerd, and the Docker eng...
Diving Through The Layers: Investigating runc, containerd, and the Docker eng...
 
Docker and containers - Presentation Slides by Priyadarshini Anand
Docker and containers - Presentation Slides by Priyadarshini AnandDocker and containers - Presentation Slides by Priyadarshini Anand
Docker and containers - Presentation Slides by Priyadarshini Anand
 
Docker slides
Docker slidesDocker slides
Docker slides
 
Docker for .NET Developers
Docker for .NET DevelopersDocker for .NET Developers
Docker for .NET Developers
 
Docker interview Questions-2.pdf
Docker interview Questions-2.pdfDocker interview Questions-2.pdf
Docker interview Questions-2.pdf
 
Docker intro
Docker introDocker intro
Docker intro
 
Docker slide
Docker slideDocker slide
Docker slide
 
Accelerate your development with Docker
Accelerate your development with DockerAccelerate your development with Docker
Accelerate your development with Docker
 
Accelerate your software development with Docker
Accelerate your software development with DockerAccelerate your software development with Docker
Accelerate your software development with Docker
 
Docker
DockerDocker
Docker
 
Introduction to Dockers.pptx
Introduction to Dockers.pptxIntroduction to Dockers.pptx
Introduction to Dockers.pptx
 
Learning Dockers - Step by Step
Learning Dockers - Step by StepLearning Dockers - Step by Step
Learning Dockers - Step by Step
 
containers and virtualization tools ( Docker )
containers and virtualization tools ( Docker )containers and virtualization tools ( Docker )
containers and virtualization tools ( Docker )
 
Docker presentation
Docker presentationDocker presentation
Docker presentation
 

Recently uploaded

Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
ssuser9bd3ba
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
Intella Parts
 
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSETECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
DuvanRamosGarzon1
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfCOLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
Kamal Acharya
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
Kamal Acharya
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
abh.arya
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
Vaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdfVaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdf
Kamal Acharya
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
MuhammadTufail242431
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
AhmedHussein950959
 

Recently uploaded (20)

Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
 
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSETECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfCOLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
Vaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdfVaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdf
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 

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

  1. 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