SlideShare a Scribd company logo
1 of 27
Download to read offline
Docker: how to "package"
your development
environment
dbCafé - 8 luglio 2015
Cristian Consonni
Quick survey
● How many people have heard about Docker
before this dbCafé?
● How many people have tried Docker?
● How many people are using it every day
very often?
Part 1
Introduction to Docker
(derived from: http://bit.ly/docker-jugtaa-1 and http://bit.ly/docker-jugtaa-2 by Mario Alexandro Santini and Cristian Consonni)
LXC (LinuX Containers)
«LXC (Linux Containers) is an operating-system-level virtualization
environment for running multiple isolated Linux systems (containers) on a
single Linux control host.»
(source: https://en.wikipedia.org/wiki/LXC)
● From inside, it looks like a VM
● From outside it looks like normal processes
● “chroot on steroids”
(source Jérôme Petazzoni, DevOps at dotCloud, http://bit.ly/1flGjit)
cgroups and namespaces
«cgroups (abbreviated from control groups) is a Linux kernel feature that
limits, accounts for and isolates the resource usage of a collection of
processes.»
(source: https://en.wikipedia.org/wiki/Cgroups)
Resources:
● CPU
● memory
● disk I/O
● network
● etc.
aufs
«aufs (short for advanced multi layered unification filesystem) implements
a union mount for Linux file systems.»
(source: https://en.wikipedia.org/wiki/Aufs)
Union mount allow several directory to be mounted at the same mount point,
appearing to be a single file system. Aufs supports copy-on-write.
Virtualization vs Containers
Virtualization Container
VMs
containers
(source: http://anandmanisankar.com/posts/container-docker-PaaS-microservices/)
Why Containers?
● Speed: boots in seconds
● Resource/memory footprint: 100-1000
containers can run on a single machine
What is Docker? (I)
«Docker is an open-source project that automates the deployment of
applications inside software containers, by providing an additional layer of
abstraction and automation of operating-system-level virtualization on Linux»
(source: https://en.wikipedia.org/wiki/Docker_(software))
What is Docker? (II)
What is Docker? (III)
Huge success:
● project started by dotCloud in January 2013
● Open sourced in March 2013
● Written in Go
● (as of July 2015) on GitHub 990+
contributors, 14000+ PR, 16500+ commits
Dockerfile (I)
Dockerfile (II)
Dockerfile (III)
DockerHub
● Docker Hub: public and private registry
● Docker registry: local registry (can be also
remote or a company registry)
● Docker Trusted Registry: service provided
by Docker, Inc.
Part 2
Docker hands-on
Install Docker
● Ubuntu:
$ wget -qO- https://get.docker.com/ | sh
(version >= 14.04 for previous version see the prerequisites at: https://docs.
docker.com/installation/ubuntulinux/)
($ sudo usermod -aG docker ubuntu)
(also packaged: $ sudo apt-get install docker.io)
● Mac OS X: Boot2Docker (CLI) o Kitematic (GUI)
● Windows: Boot2Docker (CLI)
Docker on Linux and Mac/Win
Docker client commands (I)
docker <subcommand>
● pull NAME[:TAG]
downloads the NAME[:TAG]from DockerHub
● run IMAGE [COMMAND]
launches a container with the IMAGE and execute COMMAND
● build PATH | URL | -
builds a new image from the Dockerfile in PATH
Docker client commands (II)
● ps [-a]
list running containers, with -a list all containers
● images
list images that are available locally
● rm
remove a container
● rmi
remove an image (you can not remove images you are using)
Let’s try: hello world (II)
docker ps -a
docker images
docker rm …
docker rmi …
(https://asciinema.org/a/b7j71yim7dewcka2w421s0398)
Something more: launch bash on Ubuntu
docker run -t -i ubuntu:latest
/bin/bash
(https://asciinema.org/a/5v36v9rxpvp4ywhqb4gk0bis5)
docker ps
(https://asciinema.org/a/333daetaiq7doh6cglbh8t3c8)
docker run options (I)
● -p <container_port>:<host_port>
Links the port <container_port> to <host_port>
● -t
Allocates a pseudo-tty
● -i
keep STDIN open even if it is not attach to the terminal in use
docker run options (II)
● --rm
Automatically removes the container when it is terminated
● -v <local_dir>:<container_dir>
Mounts a local dir in the specified container dir (e. g. $PWD:/mnt)
Conclusions
● Docker uses Linux Container (LXC) to automate the
deploy process
● Containers provide development environment that can
be standardized completely (no “works on my machine”
anymore)
● We want to deploy with the same ease both on the
developer/researcher laptop and in production
● Docker is heavily developed and things are moving fast
Coming soon...
● How to write a Dockerfile: Dockerfile
commands
● How to build a Docker image
● How to package a simple web application
● How to build a multi-container app
● Orchestration and much more...
Thank you!

More Related Content

What's hot

Docker and the Linux Kernel
Docker and the Linux KernelDocker and the Linux Kernel
Docker and the Linux KernelDocker, Inc.
 
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
 
Docker Global Hack Day #3
Docker Global Hack Day #3 Docker Global Hack Day #3
Docker Global Hack Day #3 Docker, Inc.
 
Mobycraft:Docker in 8-bit (Meetup at Docker HQ 4/7)
Mobycraft:Docker in 8-bit (Meetup at Docker HQ 4/7)Mobycraft:Docker in 8-bit (Meetup at Docker HQ 4/7)
Mobycraft:Docker in 8-bit (Meetup at Docker HQ 4/7)Docker, Inc.
 
Docker 101 - Intro to Docker
Docker 101 - Intro to DockerDocker 101 - Intro to Docker
Docker 101 - Intro to DockerAdrian Otto
 
Developer workflow with docker
Developer workflow with dockerDeveloper workflow with docker
Developer workflow with dockerLalatendu Mohanty
 
An Introduction to Kubernetes
An Introduction to KubernetesAn Introduction to Kubernetes
An Introduction to KubernetesImesh Gunaratne
 
Intro to containerization
Intro to containerizationIntro to containerization
Intro to containerizationBalint Pato
 
Containers: The What, Why, and How
Containers: The What, Why, and HowContainers: The What, Why, and How
Containers: The What, Why, and HowSneha Inguva
 
Introduction to docker and docker compose
Introduction to docker and docker composeIntroduction to docker and docker compose
Introduction to docker and docker composeLalatendu Mohanty
 
Docker 101: An Introduction
Docker 101: An IntroductionDocker 101: An Introduction
Docker 101: An IntroductionPOSSCON
 
Introduction to Containers - From Docker to Kubernetes and everything in between
Introduction to Containers - From Docker to Kubernetes and everything in betweenIntroduction to Containers - From Docker to Kubernetes and everything in between
Introduction to Containers - From Docker to Kubernetes and everything in betweenAll Things Open
 
Academy PRO: Docker. Part 4
Academy PRO: Docker. Part 4Academy PRO: Docker. Part 4
Academy PRO: Docker. Part 4Binary Studio
 

What's hot (20)

Docker
DockerDocker
Docker
 
Docker and the Linux Kernel
Docker and the Linux KernelDocker and the Linux Kernel
Docker and the Linux Kernel
 
Docker Presentation
Docker PresentationDocker Presentation
Docker Presentation
 
Docker in real life
Docker in real lifeDocker in real life
Docker in real life
 
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 Global Hack Day #3
Docker Global Hack Day #3 Docker Global Hack Day #3
Docker Global Hack Day #3
 
Mobycraft:Docker in 8-bit (Meetup at Docker HQ 4/7)
Mobycraft:Docker in 8-bit (Meetup at Docker HQ 4/7)Mobycraft:Docker in 8-bit (Meetup at Docker HQ 4/7)
Mobycraft:Docker in 8-bit (Meetup at Docker HQ 4/7)
 
Docker 101 - Intro to Docker
Docker 101 - Intro to DockerDocker 101 - Intro to Docker
Docker 101 - Intro to Docker
 
What is Docker
What is DockerWhat is Docker
What is Docker
 
Docker Basics
Docker BasicsDocker Basics
Docker Basics
 
Developer workflow with docker
Developer workflow with dockerDeveloper workflow with docker
Developer workflow with docker
 
presentation on Docker
presentation on Dockerpresentation on Docker
presentation on Docker
 
An Introduction to Kubernetes
An Introduction to KubernetesAn Introduction to Kubernetes
An Introduction to Kubernetes
 
Intro to containerization
Intro to containerizationIntro to containerization
Intro to containerization
 
Docker
DockerDocker
Docker
 
Containers: The What, Why, and How
Containers: The What, Why, and HowContainers: The What, Why, and How
Containers: The What, Why, and How
 
Introduction to docker and docker compose
Introduction to docker and docker composeIntroduction to docker and docker compose
Introduction to docker and docker compose
 
Docker 101: An Introduction
Docker 101: An IntroductionDocker 101: An Introduction
Docker 101: An Introduction
 
Introduction to Containers - From Docker to Kubernetes and everything in between
Introduction to Containers - From Docker to Kubernetes and everything in betweenIntroduction to Containers - From Docker to Kubernetes and everything in between
Introduction to Containers - From Docker to Kubernetes and everything in between
 
Academy PRO: Docker. Part 4
Academy PRO: Docker. Part 4Academy PRO: Docker. Part 4
Academy PRO: Docker. Part 4
 

Viewers also liked

Contare gli interi, i razionali e i reali (e altre amenità)
Contare gli interi, i razionali e i reali (e altre amenità)Contare gli interi, i razionali e i reali (e altre amenità)
Contare gli interi, i razionali e i reali (e altre amenità)Cristian Consonni
 
School of data Trento: basic spreadsheet
School of data Trento: basic spreadsheetSchool of data Trento: basic spreadsheet
School of data Trento: basic spreadsheetCristian Consonni
 
Archeowiki, When Open-Source Strategies Attract Visitors' Presence In Museums...
Archeowiki, When Open-Source Strategies Attract Visitors' Presence In Museums...Archeowiki, When Open-Source Strategies Attract Visitors' Presence In Museums...
Archeowiki, When Open-Source Strategies Attract Visitors' Presence In Museums...Cristian Consonni
 
Le opportunità della rete nel rispetto del copyright
Le opportunità della rete nel rispetto del copyrightLe opportunità della rete nel rispetto del copyright
Le opportunità della rete nel rispetto del copyrightCristian Consonni
 
Aziende e Wikipedia: dobbiamo parlare - Social Media Week Milano - Febbraio 2...
Aziende e Wikipedia: dobbiamo parlare - Social Media Week Milano - Febbraio 2...Aziende e Wikipedia: dobbiamo parlare - Social Media Week Milano - Febbraio 2...
Aziende e Wikipedia: dobbiamo parlare - Social Media Week Milano - Febbraio 2...Cristian Consonni
 
La privacy nei progetti aperti e collaborativi - il caso di Wikipedia
La privacy nei progetti aperti e collaborativi - il caso di Wikipedia La privacy nei progetti aperti e collaborativi - il caso di Wikipedia
La privacy nei progetti aperti e collaborativi - il caso di Wikipedia Cristian Consonni
 
Presentazione Wikipedia Scuole Civiche
Presentazione Wikipedia Scuole CivichePresentazione Wikipedia Scuole Civiche
Presentazione Wikipedia Scuole CivicheCristian Consonni
 
Introduzione a Docker (parte 2 - Pratica)
Introduzione a Docker (parte 2 - Pratica)Introduzione a Docker (parte 2 - Pratica)
Introduzione a Docker (parte 2 - Pratica)Cristian Consonni
 
Google cloud: Big Data + docker = kubernetes
Google cloud: Big Data + docker = kubernetesGoogle cloud: Big Data + docker = kubernetes
Google cloud: Big Data + docker = kubernetesGiuliano Latini
 
Cloud computing and networking course: paper presentation -Data Mining for In...
Cloud computing and networking course: paper presentation -Data Mining for In...Cloud computing and networking course: paper presentation -Data Mining for In...
Cloud computing and networking course: paper presentation -Data Mining for In...Cristian Consonni
 
Play Framework + Docker + CircleCI + AWS + EC2 Container Service
Play Framework + Docker + CircleCI + AWS + EC2 Container ServicePlay Framework + Docker + CircleCI + AWS + EC2 Container Service
Play Framework + Docker + CircleCI + AWS + EC2 Container ServiceJosh Padnick
 

Viewers also liked (12)

Contare gli interi, i razionali e i reali (e altre amenità)
Contare gli interi, i razionali e i reali (e altre amenità)Contare gli interi, i razionali e i reali (e altre amenità)
Contare gli interi, i razionali e i reali (e altre amenità)
 
School of data Trento: basic spreadsheet
School of data Trento: basic spreadsheetSchool of data Trento: basic spreadsheet
School of data Trento: basic spreadsheet
 
Linux Burning Machine
Linux Burning MachineLinux Burning Machine
Linux Burning Machine
 
Archeowiki, When Open-Source Strategies Attract Visitors' Presence In Museums...
Archeowiki, When Open-Source Strategies Attract Visitors' Presence In Museums...Archeowiki, When Open-Source Strategies Attract Visitors' Presence In Museums...
Archeowiki, When Open-Source Strategies Attract Visitors' Presence In Museums...
 
Le opportunità della rete nel rispetto del copyright
Le opportunità della rete nel rispetto del copyrightLe opportunità della rete nel rispetto del copyright
Le opportunità della rete nel rispetto del copyright
 
Aziende e Wikipedia: dobbiamo parlare - Social Media Week Milano - Febbraio 2...
Aziende e Wikipedia: dobbiamo parlare - Social Media Week Milano - Febbraio 2...Aziende e Wikipedia: dobbiamo parlare - Social Media Week Milano - Febbraio 2...
Aziende e Wikipedia: dobbiamo parlare - Social Media Week Milano - Febbraio 2...
 
La privacy nei progetti aperti e collaborativi - il caso di Wikipedia
La privacy nei progetti aperti e collaborativi - il caso di Wikipedia La privacy nei progetti aperti e collaborativi - il caso di Wikipedia
La privacy nei progetti aperti e collaborativi - il caso di Wikipedia
 
Presentazione Wikipedia Scuole Civiche
Presentazione Wikipedia Scuole CivichePresentazione Wikipedia Scuole Civiche
Presentazione Wikipedia Scuole Civiche
 
Introduzione a Docker (parte 2 - Pratica)
Introduzione a Docker (parte 2 - Pratica)Introduzione a Docker (parte 2 - Pratica)
Introduzione a Docker (parte 2 - Pratica)
 
Google cloud: Big Data + docker = kubernetes
Google cloud: Big Data + docker = kubernetesGoogle cloud: Big Data + docker = kubernetes
Google cloud: Big Data + docker = kubernetes
 
Cloud computing and networking course: paper presentation -Data Mining for In...
Cloud computing and networking course: paper presentation -Data Mining for In...Cloud computing and networking course: paper presentation -Data Mining for In...
Cloud computing and networking course: paper presentation -Data Mining for In...
 
Play Framework + Docker + CircleCI + AWS + EC2 Container Service
Play Framework + Docker + CircleCI + AWS + EC2 Container ServicePlay Framework + Docker + CircleCI + AWS + EC2 Container Service
Play Framework + Docker + CircleCI + AWS + EC2 Container Service
 

Similar to Introdution to Docker (theory and hands on) dbCafé - dbTrento

Powercoders · Docker · Fall 2021.pptx
Powercoders · Docker · Fall 2021.pptxPowercoders · Docker · Fall 2021.pptx
Powercoders · Docker · Fall 2021.pptxIgnacioTamayo2
 
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...Ambassador Labs
 
Dockerizing a Symfony2 application
Dockerizing a Symfony2 applicationDockerizing a Symfony2 application
Dockerizing a Symfony2 applicationRoman Rodomansky
 
Workshop : 45 minutes pour comprendre Docker avec Jérôme Petazzoni
Workshop : 45 minutes pour comprendre Docker avec Jérôme PetazzoniWorkshop : 45 minutes pour comprendre Docker avec Jérôme Petazzoni
Workshop : 45 minutes pour comprendre Docker avec Jérôme PetazzoniTheFamily
 
Introduction to Docker, December 2014 "Tour de France" Edition
Introduction to Docker, December 2014 "Tour de France" EditionIntroduction to Docker, December 2014 "Tour de France" Edition
Introduction to Docker, December 2014 "Tour de France" EditionJérôme Petazzoni
 
Présentation de Docker
Présentation de DockerPrésentation de Docker
Présentation de DockerProto204
 
Moving to Docker... Finally!
Moving to Docker... Finally!Moving to Docker... Finally!
Moving to Docker... Finally!Squareboat
 
Lecture eight to be introduced in class.
Lecture eight to be introduced in class.Lecture eight to be introduced in class.
Lecture eight to be introduced in class.nigamsajal14
 
ExpoQA 2017 Using docker to build and test in your laptop and Jenkins
ExpoQA 2017 Using docker to build and test in your laptop and JenkinsExpoQA 2017 Using docker to build and test in your laptop and Jenkins
ExpoQA 2017 Using docker to build and test in your laptop and JenkinsElasTest Project
 
Using Docker to build and test in your laptop and Jenkins
Using Docker to build and test in your laptop and JenkinsUsing Docker to build and test in your laptop and Jenkins
Using Docker to build and test in your laptop and JenkinsMicael Gallego
 
Tech talk on docker with demo
Tech talk on docker with demoTech talk on docker with demo
Tech talk on docker with demoSandeep Karnawat
 
What’s new in Docker 1.13
What’s new in Docker 1.13What’s new in Docker 1.13
What’s new in Docker 1.13Will Kinard
 
Docker 1 0 1 0 1: a Docker introduction, actualized for the stable release of...
Docker 1 0 1 0 1: a Docker introduction, actualized for the stable release of...Docker 1 0 1 0 1: a Docker introduction, actualized for the stable release of...
Docker 1 0 1 0 1: a Docker introduction, actualized for the stable release of...Jérôme Petazzoni
 
Docker Engine Evolution: From Monolith to Discrete Components
Docker Engine Evolution: From Monolith to Discrete ComponentsDocker Engine Evolution: From Monolith to Discrete Components
Docker Engine Evolution: From Monolith to Discrete ComponentsPhil Estes
 
Настройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'aНастройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'acorehard_by
 
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special EditionIntroduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special EditionJérôme Petazzoni
 

Similar to Introdution to Docker (theory and hands on) dbCafé - dbTrento (20)

From zero to Docker
From zero to DockerFrom zero to Docker
From zero to Docker
 
Powercoders · Docker · Fall 2021.pptx
Powercoders · Docker · Fall 2021.pptxPowercoders · Docker · Fall 2021.pptx
Powercoders · Docker · Fall 2021.pptx
 
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
 
Dockerizing a Symfony2 application
Dockerizing a Symfony2 applicationDockerizing a Symfony2 application
Dockerizing a Symfony2 application
 
Workshop : 45 minutes pour comprendre Docker avec Jérôme Petazzoni
Workshop : 45 minutes pour comprendre Docker avec Jérôme PetazzoniWorkshop : 45 minutes pour comprendre Docker avec Jérôme Petazzoni
Workshop : 45 minutes pour comprendre Docker avec Jérôme Petazzoni
 
Introduction to Docker, December 2014 "Tour de France" Edition
Introduction to Docker, December 2014 "Tour de France" EditionIntroduction to Docker, December 2014 "Tour de France" Edition
Introduction to Docker, December 2014 "Tour de France" Edition
 
Docker 2014
Docker 2014Docker 2014
Docker 2014
 
Présentation de Docker
Présentation de DockerPrésentation de Docker
Présentation de Docker
 
Docker.pdf
Docker.pdfDocker.pdf
Docker.pdf
 
Moving to Docker... Finally!
Moving to Docker... Finally!Moving to Docker... Finally!
Moving to Docker... Finally!
 
Lecture eight to be introduced in class.
Lecture eight to be introduced in class.Lecture eight to be introduced in class.
Lecture eight to be introduced in class.
 
docker.pdf
docker.pdfdocker.pdf
docker.pdf
 
ExpoQA 2017 Using docker to build and test in your laptop and Jenkins
ExpoQA 2017 Using docker to build and test in your laptop and JenkinsExpoQA 2017 Using docker to build and test in your laptop and Jenkins
ExpoQA 2017 Using docker to build and test in your laptop and Jenkins
 
Using Docker to build and test in your laptop and Jenkins
Using Docker to build and test in your laptop and JenkinsUsing Docker to build and test in your laptop and Jenkins
Using Docker to build and test in your laptop and Jenkins
 
Tech talk on docker with demo
Tech talk on docker with demoTech talk on docker with demo
Tech talk on docker with demo
 
What’s new in Docker 1.13
What’s new in Docker 1.13What’s new in Docker 1.13
What’s new in Docker 1.13
 
Docker 1 0 1 0 1: a Docker introduction, actualized for the stable release of...
Docker 1 0 1 0 1: a Docker introduction, actualized for the stable release of...Docker 1 0 1 0 1: a Docker introduction, actualized for the stable release of...
Docker 1 0 1 0 1: a Docker introduction, actualized for the stable release of...
 
Docker Engine Evolution: From Monolith to Discrete Components
Docker Engine Evolution: From Monolith to Discrete ComponentsDocker Engine Evolution: From Monolith to Discrete Components
Docker Engine Evolution: From Monolith to Discrete Components
 
Настройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'aНастройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'a
 
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special EditionIntroduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition
 

Recently uploaded

Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersDamian Radcliffe
 
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...singhpriety023
 
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...SUHANI PANDEY
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Sheetaleventcompany
 
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...SUHANI PANDEY
 
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.soniya singh
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...SUHANI PANDEY
 
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...SUHANI PANDEY
 
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLLucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLimonikaupta
 
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.soniya singh
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...APNIC
 
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.soniya singh
 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtrahman018755
 

Recently uploaded (20)

Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
 
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
 
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
 
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
 
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
 
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
 
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
 
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
 
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
 
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
 
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
 
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLLucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
 
Russian Call Girls in %(+971524965298 )# Call Girls in Dubai
Russian Call Girls in %(+971524965298  )#  Call Girls in DubaiRussian Call Girls in %(+971524965298  )#  Call Girls in Dubai
Russian Call Girls in %(+971524965298 )# Call Girls in Dubai
 
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
 
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirt
 

Introdution to Docker (theory and hands on) dbCafé - dbTrento

  • 1. Docker: how to "package" your development environment dbCafé - 8 luglio 2015 Cristian Consonni
  • 2. Quick survey ● How many people have heard about Docker before this dbCafé? ● How many people have tried Docker? ● How many people are using it every day very often?
  • 3. Part 1 Introduction to Docker (derived from: http://bit.ly/docker-jugtaa-1 and http://bit.ly/docker-jugtaa-2 by Mario Alexandro Santini and Cristian Consonni)
  • 4. LXC (LinuX Containers) «LXC (Linux Containers) is an operating-system-level virtualization environment for running multiple isolated Linux systems (containers) on a single Linux control host.» (source: https://en.wikipedia.org/wiki/LXC) ● From inside, it looks like a VM ● From outside it looks like normal processes ● “chroot on steroids” (source Jérôme Petazzoni, DevOps at dotCloud, http://bit.ly/1flGjit)
  • 5. cgroups and namespaces «cgroups (abbreviated from control groups) is a Linux kernel feature that limits, accounts for and isolates the resource usage of a collection of processes.» (source: https://en.wikipedia.org/wiki/Cgroups) Resources: ● CPU ● memory ● disk I/O ● network ● etc.
  • 6. aufs «aufs (short for advanced multi layered unification filesystem) implements a union mount for Linux file systems.» (source: https://en.wikipedia.org/wiki/Aufs) Union mount allow several directory to be mounted at the same mount point, appearing to be a single file system. Aufs supports copy-on-write.
  • 7. Virtualization vs Containers Virtualization Container VMs containers (source: http://anandmanisankar.com/posts/container-docker-PaaS-microservices/)
  • 8. Why Containers? ● Speed: boots in seconds ● Resource/memory footprint: 100-1000 containers can run on a single machine
  • 9. What is Docker? (I) «Docker is an open-source project that automates the deployment of applications inside software containers, by providing an additional layer of abstraction and automation of operating-system-level virtualization on Linux» (source: https://en.wikipedia.org/wiki/Docker_(software))
  • 11. What is Docker? (III) Huge success: ● project started by dotCloud in January 2013 ● Open sourced in March 2013 ● Written in Go ● (as of July 2015) on GitHub 990+ contributors, 14000+ PR, 16500+ commits
  • 15. DockerHub ● Docker Hub: public and private registry ● Docker registry: local registry (can be also remote or a company registry) ● Docker Trusted Registry: service provided by Docker, Inc.
  • 17. Install Docker ● Ubuntu: $ wget -qO- https://get.docker.com/ | sh (version >= 14.04 for previous version see the prerequisites at: https://docs. docker.com/installation/ubuntulinux/) ($ sudo usermod -aG docker ubuntu) (also packaged: $ sudo apt-get install docker.io) ● Mac OS X: Boot2Docker (CLI) o Kitematic (GUI) ● Windows: Boot2Docker (CLI)
  • 18. Docker on Linux and Mac/Win
  • 19. Docker client commands (I) docker <subcommand> ● pull NAME[:TAG] downloads the NAME[:TAG]from DockerHub ● run IMAGE [COMMAND] launches a container with the IMAGE and execute COMMAND ● build PATH | URL | - builds a new image from the Dockerfile in PATH
  • 20. Docker client commands (II) ● ps [-a] list running containers, with -a list all containers ● images list images that are available locally ● rm remove a container ● rmi remove an image (you can not remove images you are using)
  • 21. Let’s try: hello world (II) docker ps -a docker images docker rm … docker rmi … (https://asciinema.org/a/b7j71yim7dewcka2w421s0398)
  • 22. Something more: launch bash on Ubuntu docker run -t -i ubuntu:latest /bin/bash (https://asciinema.org/a/5v36v9rxpvp4ywhqb4gk0bis5) docker ps (https://asciinema.org/a/333daetaiq7doh6cglbh8t3c8)
  • 23. docker run options (I) ● -p <container_port>:<host_port> Links the port <container_port> to <host_port> ● -t Allocates a pseudo-tty ● -i keep STDIN open even if it is not attach to the terminal in use
  • 24. docker run options (II) ● --rm Automatically removes the container when it is terminated ● -v <local_dir>:<container_dir> Mounts a local dir in the specified container dir (e. g. $PWD:/mnt)
  • 25. Conclusions ● Docker uses Linux Container (LXC) to automate the deploy process ● Containers provide development environment that can be standardized completely (no “works on my machine” anymore) ● We want to deploy with the same ease both on the developer/researcher laptop and in production ● Docker is heavily developed and things are moving fast
  • 26. Coming soon... ● How to write a Dockerfile: Dockerfile commands ● How to build a Docker image ● How to package a simple web application ● How to build a multi-container app ● Orchestration and much more...