SlideShare une entreprise Scribd logo
1  sur  18
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

Contenu connexe

Tendances

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 IntroductionPOSSCON
 
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 @TwitterdotCloud
 
Introduction of Docker and Docker Compose
Introduction of Docker and Docker ComposeIntroduction of Docker and Docker Compose
Introduction of Docker and Docker ComposeDr. 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é - dbTrentoCristian Consonni
 
Docker Container-Introduction and Features
Docker Container-Introduction and FeaturesDocker Container-Introduction and Features
Docker Container-Introduction and FeaturesAshnikbiz
 
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-12dotCloud
 
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'sJeremy Haas
 
Dockerizing development workflow
Dockerizing development workflowDockerizing development workflow
Dockerizing development workflowOrest 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 environmentOrest 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 WorkshopAjeet Singh Raina
 
DCA. certificate slide Session 1
DCA. certificate slide Session 1DCA. certificate slide Session 1
DCA. certificate slide Session 1Hadi Tayanloo
 
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 @GuidewiredotCloud
 

Tendances (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
 

Similaire à Introduction to docker and oci

Dockers and containers basics
Dockers and containers basicsDockers and containers basics
Dockers and containers basicsSourabh Saxena
 
Introduction to Containers and Docker
Introduction to Containers and DockerIntroduction to Containers and Docker
Introduction to Containers and DockerFayçal Bziou
 
Docker in practice
Docker in practiceDocker in practice
Docker in practiceGeert 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 AnandPRIYADARSHINI ANAND
 
Docker for .NET Developers
Docker for .NET DevelopersDocker for .NET Developers
Docker for .NET DevelopersTaswar Bhatti
 
Docker interview Questions-2.pdf
Docker interview Questions-2.pdfDocker interview Questions-2.pdf
Docker interview Questions-2.pdfYogeshwaran R
 
Accelerate your development with Docker
Accelerate your development with DockerAccelerate your development with Docker
Accelerate your development with DockerAndrey Hristov
 
Accelerate your software development with Docker
Accelerate your software development with DockerAccelerate your software development with Docker
Accelerate your software development with DockerAndrey Hristov
 
Introduction to Dockers.pptx
Introduction to Dockers.pptxIntroduction to Dockers.pptx
Introduction to Dockers.pptxHassanRaza40719
 
Learning Dockers - Step by Step
Learning Dockers - Step by StepLearning Dockers - Step by Step
Learning Dockers - Step by StepAdnan Siddiqi
 
containers and virtualization tools ( Docker )
containers and virtualization tools ( Docker )containers and virtualization tools ( Docker )
containers and virtualization tools ( Docker )Imo Inyang
 

Similaire à 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
 

Dernier

DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationBhangaleSonal
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptMsecMca
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086anil_gaur
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxJuliansyahHarahap1
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...SUHANI PANDEY
 
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...soginsider
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityMorshed Ahmed Rahath
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptxJIT KUMAR GUPTA
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaOmar Fathy
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.Kamal Acharya
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptNANDHAKUMARA10
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringmulugeta48
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 

Dernier (20)

DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 

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

Notes de l'éditeur

  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