SlideShare a Scribd company logo
1 of 55
Download to read offline
Docker
Automatic Deployment For Dummies
Renaud Hoyoux
GIGA - Syst-Mod - Universit´e de Li`ege
Faculty of Applied Sciences
School of engineering and computer science
Program
Program :
What is Docker (and what Docker is not) ?
How to use it ?
How to create its own container ?
Advantages
Drawbacks
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 2/30
Faculty of Applied Sciences
School of engineering and computer science
Cytomine Team
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 3/30
Faculty of Applied Sciences
School of engineering and computer science
Cytomine Team
Rapha¨el Mar´ee
Group Leader
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 3/30
Faculty of Applied Sciences
School of engineering and computer science
Cytomine Team
Rapha¨el Mar´ee
Group Leader
Lo¨ıc Rollus
Lead Developer
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 3/30
Faculty of Applied Sciences
School of engineering and computer science
Cytomine Team
Rapha¨el Mar´ee
Group Leader
Lo¨ıc Rollus
Lead Developer
Renaud Hoyoux
Developer
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 3/30
Faculty of Applied Sciences
School of engineering and computer science
Cytomine Team
Rapha¨el Mar´ee
Group Leader
Lo¨ıc Rollus
Lead Developer
Renaud Hoyoux
Developer
Julien Confetti
Intern
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 3/30
Faculty of Applied Sciences
School of engineering and computer science
Cytomine Team
Rapha¨el Mar´ee
Group Leader
Lo¨ıc Rollus
Lead Developer
Renaud Hoyoux
Developer
Julien Confetti
Intern
Each of us has its speciality (Python, NodeJS, Groovy, Java8,
Frontend, RabbitMQ, ...).
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 3/30
Faculty of Applied Sciences
School of engineering and computer science
A pleasure to use
CYTOMINE Install/Deploy
CYTOMINE Web Clients
CYTOMINE Clients
Backbone.jsHtml 5 Javascript AngularJS
JavaPython
Content based
Image retrieval
CYTOMINE Retrieval
CYTOMINE Core
CYTOMINE Ims
REST API HTTP
Object Detection
Cell Classifier
Tissue Detect
Tissue Segment
Annotation Stats
Your app
…
CYTOMINE Apps
Redis Java
Grails Java Hibernate
PostgreSQL MongoDBPostgis
Grails Java
CYTOMINE IIP
CYTOMINE Monitoring
Node.js
MongoDB
File systemGlusterFS
Docker
Cytomine
A rich internet application
for visualization,
collaborative annotation,
and automatic analysis
of large-scale bioimages
www.cytomine.be
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 4/30
Faculty of Applied Sciences
School of engineering and computer science
... a HUGE mess to deploy
All these technologies used in the following development
environments :
Ubuntu 14.04 LTS
OSX
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 5/30
Faculty of Applied Sciences
School of engineering and computer science
... a HUGE mess to deploy
All these technologies used in the following development
environments :
Ubuntu 14.04 LTS
OSX
to deploy on these production environments :
Ubuntu 12.04 LTS
Ubuntu 14.04 LTS
Centos 6.6
Centos 7
?
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 5/30
Faculty of Applied Sciences
School of engineering and computer science
... a HUGE mess to deploy
All these technologies used in the following development
environments :
Ubuntu 14.04 LTS
OSX
to deploy on these production environments :
Ubuntu 12.04 LTS
Ubuntu 14.04 LTS
Centos 6.6
Centos 7
?
⇒ WARNING ! ! ! Problems are coming !
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 5/30
Faculty of Applied Sciences
School of engineering and computer science
What is Docker
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 6/30
Faculty of Applied Sciences
School of engineering and computer science
What is Docker
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 6/30
Faculty of Applied Sciences
School of engineering and computer science
What is Docker
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 7/30
Faculty of Applied Sciences
School of engineering and computer science
What is Docker
By Wikipedia
Docker is an open-source project that automates the deployment
of applications inside software containers (...) on Linux.
Docker uses resource isolation features of the Linux kernel such as
cgroups and kernel namespaces to allow independent ”containers”
to run within a single Linux instance.
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 8/30
Faculty of Applied Sciences
School of engineering and computer science
What is Docker
By Wikipedia
Docker is an open-source project that automates the
deployment of applications inside software containers (...) on
Linux.
Docker uses resource isolation features of the Linux kernel such as
cgroups and kernel namespaces to allow independent
”containers” to run within a single Linux instance.
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 9/30
Faculty of Applied Sciences
School of engineering and computer science
What Docker is not
Diff´erence to a VM
VM Docker
The processes are isolated from one another but not from the host
machine.
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 10/30
Faculty of Applied Sciences
School of engineering and computer science
How to use
Run a container
I want to try centos
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 11/30
Faculty of Applied Sciences
School of engineering and computer science
How to use
Run a container
I want to try centos
sudo docker run centos
>> Unable to find image ’centos:latest’ locally
>> centos:latest: The image you are pulling has been
verified
>> 88f9454e60dd: Pull complete
>> 511136ea3c5a: Already exists
>> 5b12ef8fd570: Already exists sudo docker run -it
centos /bin/bash
>> Status: Downloaded newer image for centos:latest
>> FATA[0000] Error response from daemon: No command
specified
sudo docker run centos /bin/bash
sudo docker run -t centos /bin/bash
[root@15a1a295ae56 /]#
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 11/30
Faculty of Applied Sciences
School of engineering and computer science
How to use
Main commands
-v path:path Volumes mapping
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 12/30
Faculty of Applied Sciences
School of engineering and computer science
How to use
Main commands
-v path:path Volumes mapping
-p port:port Ports binding
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 12/30
Faculty of Applied Sciences
School of engineering and computer science
How to use
Main commands
-v path:path Volumes mapping
-p port:port Ports binding
--link One way communication
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 12/30
Faculty of Applied Sciences
School of engineering and computer science
How to use
Main commands
-v path:path Volumes mapping
-p port:port Ports binding
--link One way communication
-e Set an environment variable
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 12/30
Faculty of Applied Sciences
School of engineering and computer science
How to use
Main commands
-v path:path Volumes mapping
-p port:port Ports binding
--link One way communication
-e Set an environment variable
--name Set name
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 12/30
Faculty of Applied Sciences
School of engineering and computer science
How to use
Main commands
-v path:path Volumes mapping
-p port:port Ports binding
--link One way communication
-e Set an environment variable
--name Set name
--privileged
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 12/30
Faculty of Applied Sciences
School of engineering and computer science
How to use
Example
postgresql : -p 49153:5432
rails : -p 49154:3000 --link postgresql
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 13/30
Faculty of Applied Sciences
School of engineering and computer science
Create its container
I want my own custom container !
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 14/30
Faculty of Applied Sciences
School of engineering and computer science
Create its container
Image and Dockerfile
An image is a read-only layer.
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 15/30
Faculty of Applied Sciences
School of engineering and computer science
Create its container
Image and Dockerfile
An image is a read-only layer.
We run container based on an image.
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 15/30
Faculty of Applied Sciences
School of engineering and computer science
Create its container
Image and Dockerfile
An image is a read-only layer.
We run container based on an image.
A Dockerfile is a text document that contains all the
commands you would normally execute manually in order to
build a Docker image.
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 15/30
Faculty of Applied Sciences
School of engineering and computer science
Create its container
Image and Dockerfile
An image is a read-only layer.
We run container based on an image.
A Dockerfile is a text document that contains all the
commands you would normally execute manually in order to
build a Docker image.
By calling docker build from your terminal, you can have
Docker build your image step by step, executing the
instructions successively.
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 15/30
Faculty of Applied Sciences
School of engineering and computer science
Create its container
Example
Redis installation
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 16/30
Faculty of Applied Sciences
School of engineering and computer science
Create its container
Example
Redis installation
FROM debian:wheezy
RUN apt−get update && apt−get install −y curl 
&& rm −rf /var/lib/apt/ lists /∗
RUN curl −o /usr/local/bin/gosu −SL
”https://github.com/tianon/gosu/releases/download/1.2/gosu−$(dpkg
−−print−architecture)” 
&& gpg −−verify /usr/local/bin/gosu.asc && rm /usr/local/bin/gosu.asc 
&& chmod +x /usr/local/bin/gosu
ENV REDIS VERSION 2.8.19
ADD docker−entrypoint.sh /entrypoint.sh
ENTRYPOINT [”/entrypoint.sh”]
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 16/30
Faculty of Applied Sciences
School of engineering and computer science
Create its container
Example
cd redisTest && docker build -t="cytomine/redis" .
docker run -p 22 --privileged --name geekRedis 
-v .:/test/ cytomine/redis
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 17/30
Faculty of Applied Sciences
School of engineering and computer science
Create its container
Les oignons c’est bon
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 18/30
Faculty of Applied Sciences
School of engineering and computer science
Create its container
Les oignons c’est bon
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 18/30
Faculty of Applied Sciences
School of engineering and computer science
Create its container
Les oignons c’est bon
First layer :
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 19/30
Faculty of Applied Sciences
School of engineering and computer science
Create its container
Les oignons c’est bon
First layer :
FROM debian:wheezy
RUN apt−get update && apt−get install −y curl 
&& rm −rf /var/lib/apt/ lists /∗
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 19/30
Faculty of Applied Sciences
School of engineering and computer science
Create its container
Les oignons c’est bon
First layer :
FROM debian:wheezy
RUN apt−get update && apt−get install −y curl 
&& rm −rf /var/lib/apt/ lists /∗
Second layer :
RUN curl −o /usr/local/bin/gosu −SL
”https://github.com/tianon/gosu/releases/download/1.2/gosu−$(dpkg
−−print−architecture)” 
&& gpg −−verify /usr/local/bin/gosu.asc && rm /usr/local/bin/gosu.asc 
&& chmod +x /usr/local/bin/gosu
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 19/30
Faculty of Applied Sciences
School of engineering and computer science
Create its container
Les oignons c’est bon
First layer :
FROM debian:wheezy
RUN apt−get update && apt−get install −y curl 
&& rm −rf /var/lib/apt/ lists /∗
Second layer :
RUN curl −o /usr/local/bin/gosu −SL
”https://github.com/tianon/gosu/releases/download/1.2/gosu−$(dpkg
−−print−architecture)” 
&& gpg −−verify /usr/local/bin/gosu.asc && rm /usr/local/bin/gosu.asc 
&& chmod +x /usr/local/bin/gosu
Third layer :
ENV REDIS VERSION 2.8.19
...
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 19/30
Faculty of Applied Sciences
School of engineering and computer science
Create its container
Les oignons c’est bon
Step 0 : FROM ubuntu:14.04
---> 2103b00b3fdf
Step 1 : MAINTAINER Cytomine Team "support@cytomine.be"
---> Using cache
---> c544207d0347
Step 2 : RUN apt-get install -y openssh-server
---> Using cache
---> e4cefcd52418
...
Step 9 : EXPOSE 22
---> Using cache
---> 3e0d97b94f3e
Successfully built 3e0d97b94f3e
Sending build context to Docker daemon 9.728 kB
Sending build context to Docker daemon
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 20/30
Faculty of Applied Sciences
School of engineering and computer science
Create its container
Inheritance
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 21/30
Faculty of Applied Sciences
School of engineering and computer science
Create its container
Inheritance
FROM redis
MAINTAINER ”Cytomine Team support@cytomine.be”
...
RUN echo ”deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty
main” | tee /etc/apt/sources.list .d/webupd8team−java.list
RUN apt−key adv −−keyserver hkp://keyserver.ubuntu.com:80 −−recv−keys
EEA14886
RUN apt−get install −y oracle−java8−installer
ADD deploy.sh /tmp/deploy.sh
RUN chmod +x /tmp/deploy.sh
ENTRYPOINT [”/tmp/deploy.sh”]
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 21/30
Faculty of Applied Sciences
School of engineering and computer science
Advantages
Fig
Weave
DevOps
Because we love Open Source ;-)
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 22/30
Faculty of Applied Sciences
School of engineering and computer science
Advantages
Fig
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 23/30
Faculty of Applied Sciences
School of engineering and computer science
Advantages
Before
docker run -d redis
docker build -t="web" .
docker run -d -p 5000:5000 
--link redis:redis 
-v .:/code --name web 
web
After
web:
build: .
ports:
- "5000:5000"
volumes:
- .:/code
links:
- redis
redis:
image: redis
So long fig ! Welcome to Docker Compose !
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 24/30
Faculty of Applied Sciences
School of engineering and computer science
Advantages
Weave
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 25/30
Faculty of Applied Sciences
School of engineering and computer science
Drawbacks
Cache
Step 0 : FROM ubuntu:14.04
---> 2103b00b3fdf
Step 1 : MAINTAINER Cytomine Team "support@cytomine.be"
---> Using cache
---> c544207d0347
Step 2 : RUN apt-get install -y openssh-server
---> Using cache
---> e4cefcd52418
...
The cache is used even if the above command doesn’t run
anymore.
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 26/30
Faculty of Applied Sciences
School of engineering and computer science
Drawbacks
Cache
Step 0 : FROM ubuntu:14.04
---> 2103b00b3fdf
Step 1 : MAINTAINER Cytomine Team "support@cytomine.be"
---> Using cache
---> c544207d0347
Step 2 : RUN apt-get install -y openssh-server
---> Using cache
---> e4cefcd52418
...
The cache is used even if the above command doesn’t run
anymore.
⇒ Bad surprise during a clean installation.
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 26/30
Faculty of Applied Sciences
School of engineering and computer science
Drawbacks
No dynamic container linking
if [ $APP1_ENABLED = true ]
then
docker run --link app1 
... (plenty lines)
else if [ $APP2_ENABLED = true ]
then
docker run --link app2 
... (plenty lines)
else
...
fi
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 27/30
Faculty of Applied Sciences
School of engineering and computer science
Drawbacks
No dynamic container linking
if [ $APP1_ENABLED = true ]
then
docker run --link app1 
... (plenty lines)
else if [ $APP2_ENABLED = true ]
then
docker run --link app2 
... (plenty lines)
else
...
fi
:s
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 27/30
Faculty of Applied Sciences
School of engineering and computer science
Docker used in production
Cytomine Architecture
Diagram :
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 28/30
Faculty of Applied Sciences
School of engineering and computer science
Devops
My dev’ environment
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 29/30
Faculty of Applied Sciences
School of engineering and computer science
The end
Thanks !
22 avril 2015 Docker
Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 30/30

More Related Content

Similar to Docker - Automatic Deployment for Dummies

Similar to Docker - Automatic Deployment for Dummies (20)

Clocker, the Docker Cloud Maker - Andrea Turli - Codemotion Rome 2015
Clocker, the Docker Cloud Maker - Andrea Turli - Codemotion Rome 2015Clocker, the Docker Cloud Maker - Andrea Turli - Codemotion Rome 2015
Clocker, the Docker Cloud Maker - Andrea Turli - Codemotion Rome 2015
 
Docker - BWI Innovation Talk
Docker - BWI Innovation TalkDocker - BWI Innovation Talk
Docker - BWI Innovation Talk
 
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...
 
Docker opens the Doors for IoT
Docker opens the Doors for IoTDocker opens the Doors for IoT
Docker opens the Doors for IoT
 
Opencast Project Update at Open Apereo 2015
Opencast Project Update at Open Apereo 2015Opencast Project Update at Open Apereo 2015
Opencast Project Update at Open Apereo 2015
 
Cloud Native Landscape (CNCF and OCI)
Cloud Native Landscape (CNCF and OCI)Cloud Native Landscape (CNCF and OCI)
Cloud Native Landscape (CNCF and OCI)
 
Docker - A high level introduction to dockers and containers
Docker - A high level introduction to dockers and containersDocker - A high level introduction to dockers and containers
Docker - A high level introduction to dockers and containers
 
Pyfest Tunisia 2015 - Python & DevOps
Pyfest Tunisia 2015 - Python & DevOpsPyfest Tunisia 2015 - Python & DevOps
Pyfest Tunisia 2015 - Python & DevOps
 
Codemotion Rome 2015 IBM Bluemix and Docker
Codemotion Rome 2015 IBM Bluemix and DockerCodemotion Rome 2015 IBM Bluemix and Docker
Codemotion Rome 2015 IBM Bluemix and Docker
 
Docker en kernel security
Docker en kernel securityDocker en kernel security
Docker en kernel security
 
Moby Open Source Summit North America 2017
Moby Open Source Summit North America 2017Moby Open Source Summit North America 2017
Moby Open Source Summit North America 2017
 
Docker on ARM Raspberry Pi
Docker on ARM Raspberry PiDocker on ARM Raspberry Pi
Docker on ARM Raspberry Pi
 
Auckland Docker Meetup (July 2015) - DockerCon2015 lightningtalk
Auckland Docker Meetup (July 2015) - DockerCon2015 lightningtalkAuckland Docker Meetup (July 2015) - DockerCon2015 lightningtalk
Auckland Docker Meetup (July 2015) - DockerCon2015 lightningtalk
 
CI/CD with Github Actions
CI/CD with Github ActionsCI/CD with Github Actions
CI/CD with Github Actions
 
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
 
Programming IoT with Docker: How to Start?
Programming IoT with Docker: How to Start?Programming IoT with Docker: How to Start?
Programming IoT with Docker: How to Start?
 
OMA LwM2M Workshop - Matthias Kovatsch, OMA LwM2M DevKit
OMA LwM2M Workshop - Matthias Kovatsch, OMA LwM2M DevKitOMA LwM2M Workshop - Matthias Kovatsch, OMA LwM2M DevKit
OMA LwM2M Workshop - Matthias Kovatsch, OMA LwM2M DevKit
 
DEEP: a user success story
DEEP: a user success storyDEEP: a user success story
DEEP: a user success story
 
Microsoft ♥ Open Source
Microsoft ♥ Open SourceMicrosoft ♥ Open Source
Microsoft ♥ Open Source
 
Building Eclipse Plugins and RCP Applications with Tycho - ECE 2012
Building Eclipse Plugins and RCP Applications with Tycho - ECE 2012Building Eclipse Plugins and RCP Applications with Tycho - ECE 2012
Building Eclipse Plugins and RCP Applications with Tycho - ECE 2012
 

More from Geeks Anonymes

More from Geeks Anonymes (20)

Programmer sous Unreal Engine
Programmer sous Unreal EngineProgrammer sous Unreal Engine
Programmer sous Unreal Engine
 
Implémentation efficace et durable de processus métiers complexes
Implémentation efficace et durable de processus métiers complexesImplémentation efficace et durable de processus métiers complexes
Implémentation efficace et durable de processus métiers complexes
 
Managing Open Source Licenses (Geeks Anonymes)
Managing Open Source Licenses (Geeks Anonymes)Managing Open Source Licenses (Geeks Anonymes)
Managing Open Source Licenses (Geeks Anonymes)
 
Reprendre le contrôle de ses données
Reprendre le contrôle de ses donnéesReprendre le contrôle de ses données
Reprendre le contrôle de ses données
 
Geeks Anonymes - Le langage Go
Geeks Anonymes - Le langage GoGeeks Anonymes - Le langage Go
Geeks Anonymes - Le langage Go
 
Le rôle du testeur et le Blackbox testing
Le rôle du testeur et le Blackbox testingLe rôle du testeur et le Blackbox testing
Le rôle du testeur et le Blackbox testing
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
Vulnérabilités au cœur des applications Web, menaces et contre-mesures
 Vulnérabilités au cœur des applications Web, menaces et contre-mesures Vulnérabilités au cœur des applications Web, menaces et contre-mesures
Vulnérabilités au cœur des applications Web, menaces et contre-mesures
 
191121 philippe teuwen cryptographie et attaques materielles
191121 philippe teuwen cryptographie et attaques materielles191121 philippe teuwen cryptographie et attaques materielles
191121 philippe teuwen cryptographie et attaques materielles
 
"Surfez couverts !" - Conseils de Cyber securité
"Surfez couverts !" - Conseils de Cyber securité "Surfez couverts !" - Conseils de Cyber securité
"Surfez couverts !" - Conseils de Cyber securité
 
Introduction au développement mobile - développer une application iOS et Andr...
Introduction au développement mobile - développer une application iOS et Andr...Introduction au développement mobile - développer une application iOS et Andr...
Introduction au développement mobile - développer une application iOS et Andr...
 
Le langage rust
Le langage rustLe langage rust
Le langage rust
 
Test your code
Test your codeTest your code
Test your code
 
Intelligence artificielle et propriété intellectuelle
Intelligence artificielle et propriété intellectuelleIntelligence artificielle et propriété intellectuelle
Intelligence artificielle et propriété intellectuelle
 
Pour une histoire plophonique du jeu video
Pour une histoire plophonique du jeu videoPour une histoire plophonique du jeu video
Pour une histoire plophonique du jeu video
 
Become Rick and famous, thanks to Open Source
Become Rick and famous, thanks to Open SourceBecome Rick and famous, thanks to Open Source
Become Rick and famous, thanks to Open Source
 
Reconnaissance vocale et création artistique
Reconnaissance vocale et création artistiqueReconnaissance vocale et création artistique
Reconnaissance vocale et création artistique
 
Natural Language Processing
Natural Language ProcessingNatural Language Processing
Natural Language Processing
 
Sécurité, GDPR : vos données ont de la valeur
Sécurité, GDPR : vos données ont de la valeur Sécurité, GDPR : vos données ont de la valeur
Sécurité, GDPR : vos données ont de la valeur
 
Modern sql
Modern sqlModern sql
Modern sql
 

Recently uploaded

The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 

Recently uploaded (20)

The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 

Docker - Automatic Deployment for Dummies

  • 1. Docker Automatic Deployment For Dummies Renaud Hoyoux GIGA - Syst-Mod - Universit´e de Li`ege
  • 2. Faculty of Applied Sciences School of engineering and computer science Program Program : What is Docker (and what Docker is not) ? How to use it ? How to create its own container ? Advantages Drawbacks 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 2/30
  • 3. Faculty of Applied Sciences School of engineering and computer science Cytomine Team 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 3/30
  • 4. Faculty of Applied Sciences School of engineering and computer science Cytomine Team Rapha¨el Mar´ee Group Leader 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 3/30
  • 5. Faculty of Applied Sciences School of engineering and computer science Cytomine Team Rapha¨el Mar´ee Group Leader Lo¨ıc Rollus Lead Developer 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 3/30
  • 6. Faculty of Applied Sciences School of engineering and computer science Cytomine Team Rapha¨el Mar´ee Group Leader Lo¨ıc Rollus Lead Developer Renaud Hoyoux Developer 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 3/30
  • 7. Faculty of Applied Sciences School of engineering and computer science Cytomine Team Rapha¨el Mar´ee Group Leader Lo¨ıc Rollus Lead Developer Renaud Hoyoux Developer Julien Confetti Intern 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 3/30
  • 8. Faculty of Applied Sciences School of engineering and computer science Cytomine Team Rapha¨el Mar´ee Group Leader Lo¨ıc Rollus Lead Developer Renaud Hoyoux Developer Julien Confetti Intern Each of us has its speciality (Python, NodeJS, Groovy, Java8, Frontend, RabbitMQ, ...). 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 3/30
  • 9. Faculty of Applied Sciences School of engineering and computer science A pleasure to use CYTOMINE Install/Deploy CYTOMINE Web Clients CYTOMINE Clients Backbone.jsHtml 5 Javascript AngularJS JavaPython Content based Image retrieval CYTOMINE Retrieval CYTOMINE Core CYTOMINE Ims REST API HTTP Object Detection Cell Classifier Tissue Detect Tissue Segment Annotation Stats Your app … CYTOMINE Apps Redis Java Grails Java Hibernate PostgreSQL MongoDBPostgis Grails Java CYTOMINE IIP CYTOMINE Monitoring Node.js MongoDB File systemGlusterFS Docker Cytomine A rich internet application for visualization, collaborative annotation, and automatic analysis of large-scale bioimages www.cytomine.be 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 4/30
  • 10. Faculty of Applied Sciences School of engineering and computer science ... a HUGE mess to deploy All these technologies used in the following development environments : Ubuntu 14.04 LTS OSX 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 5/30
  • 11. Faculty of Applied Sciences School of engineering and computer science ... a HUGE mess to deploy All these technologies used in the following development environments : Ubuntu 14.04 LTS OSX to deploy on these production environments : Ubuntu 12.04 LTS Ubuntu 14.04 LTS Centos 6.6 Centos 7 ? 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 5/30
  • 12. Faculty of Applied Sciences School of engineering and computer science ... a HUGE mess to deploy All these technologies used in the following development environments : Ubuntu 14.04 LTS OSX to deploy on these production environments : Ubuntu 12.04 LTS Ubuntu 14.04 LTS Centos 6.6 Centos 7 ? ⇒ WARNING ! ! ! Problems are coming ! 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 5/30
  • 13. Faculty of Applied Sciences School of engineering and computer science What is Docker 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 6/30
  • 14. Faculty of Applied Sciences School of engineering and computer science What is Docker 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 6/30
  • 15. Faculty of Applied Sciences School of engineering and computer science What is Docker 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 7/30
  • 16. Faculty of Applied Sciences School of engineering and computer science What is Docker By Wikipedia Docker is an open-source project that automates the deployment of applications inside software containers (...) on Linux. Docker uses resource isolation features of the Linux kernel such as cgroups and kernel namespaces to allow independent ”containers” to run within a single Linux instance. 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 8/30
  • 17. Faculty of Applied Sciences School of engineering and computer science What is Docker By Wikipedia Docker is an open-source project that automates the deployment of applications inside software containers (...) on Linux. Docker uses resource isolation features of the Linux kernel such as cgroups and kernel namespaces to allow independent ”containers” to run within a single Linux instance. 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 9/30
  • 18. Faculty of Applied Sciences School of engineering and computer science What Docker is not Diff´erence to a VM VM Docker The processes are isolated from one another but not from the host machine. 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 10/30
  • 19. Faculty of Applied Sciences School of engineering and computer science How to use Run a container I want to try centos 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 11/30
  • 20. Faculty of Applied Sciences School of engineering and computer science How to use Run a container I want to try centos sudo docker run centos >> Unable to find image ’centos:latest’ locally >> centos:latest: The image you are pulling has been verified >> 88f9454e60dd: Pull complete >> 511136ea3c5a: Already exists >> 5b12ef8fd570: Already exists sudo docker run -it centos /bin/bash >> Status: Downloaded newer image for centos:latest >> FATA[0000] Error response from daemon: No command specified sudo docker run centos /bin/bash sudo docker run -t centos /bin/bash [root@15a1a295ae56 /]# 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 11/30
  • 21. Faculty of Applied Sciences School of engineering and computer science How to use Main commands -v path:path Volumes mapping 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 12/30
  • 22. Faculty of Applied Sciences School of engineering and computer science How to use Main commands -v path:path Volumes mapping -p port:port Ports binding 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 12/30
  • 23. Faculty of Applied Sciences School of engineering and computer science How to use Main commands -v path:path Volumes mapping -p port:port Ports binding --link One way communication 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 12/30
  • 24. Faculty of Applied Sciences School of engineering and computer science How to use Main commands -v path:path Volumes mapping -p port:port Ports binding --link One way communication -e Set an environment variable 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 12/30
  • 25. Faculty of Applied Sciences School of engineering and computer science How to use Main commands -v path:path Volumes mapping -p port:port Ports binding --link One way communication -e Set an environment variable --name Set name 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 12/30
  • 26. Faculty of Applied Sciences School of engineering and computer science How to use Main commands -v path:path Volumes mapping -p port:port Ports binding --link One way communication -e Set an environment variable --name Set name --privileged 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 12/30
  • 27. Faculty of Applied Sciences School of engineering and computer science How to use Example postgresql : -p 49153:5432 rails : -p 49154:3000 --link postgresql 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 13/30
  • 28. Faculty of Applied Sciences School of engineering and computer science Create its container I want my own custom container ! 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 14/30
  • 29. Faculty of Applied Sciences School of engineering and computer science Create its container Image and Dockerfile An image is a read-only layer. 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 15/30
  • 30. Faculty of Applied Sciences School of engineering and computer science Create its container Image and Dockerfile An image is a read-only layer. We run container based on an image. 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 15/30
  • 31. Faculty of Applied Sciences School of engineering and computer science Create its container Image and Dockerfile An image is a read-only layer. We run container based on an image. A Dockerfile is a text document that contains all the commands you would normally execute manually in order to build a Docker image. 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 15/30
  • 32. Faculty of Applied Sciences School of engineering and computer science Create its container Image and Dockerfile An image is a read-only layer. We run container based on an image. A Dockerfile is a text document that contains all the commands you would normally execute manually in order to build a Docker image. By calling docker build from your terminal, you can have Docker build your image step by step, executing the instructions successively. 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 15/30
  • 33. Faculty of Applied Sciences School of engineering and computer science Create its container Example Redis installation 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 16/30
  • 34. Faculty of Applied Sciences School of engineering and computer science Create its container Example Redis installation FROM debian:wheezy RUN apt−get update && apt−get install −y curl && rm −rf /var/lib/apt/ lists /∗ RUN curl −o /usr/local/bin/gosu −SL ”https://github.com/tianon/gosu/releases/download/1.2/gosu−$(dpkg −−print−architecture)” && gpg −−verify /usr/local/bin/gosu.asc && rm /usr/local/bin/gosu.asc && chmod +x /usr/local/bin/gosu ENV REDIS VERSION 2.8.19 ADD docker−entrypoint.sh /entrypoint.sh ENTRYPOINT [”/entrypoint.sh”] 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 16/30
  • 35. Faculty of Applied Sciences School of engineering and computer science Create its container Example cd redisTest && docker build -t="cytomine/redis" . docker run -p 22 --privileged --name geekRedis -v .:/test/ cytomine/redis 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 17/30
  • 36. Faculty of Applied Sciences School of engineering and computer science Create its container Les oignons c’est bon 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 18/30
  • 37. Faculty of Applied Sciences School of engineering and computer science Create its container Les oignons c’est bon 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 18/30
  • 38. Faculty of Applied Sciences School of engineering and computer science Create its container Les oignons c’est bon First layer : 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 19/30
  • 39. Faculty of Applied Sciences School of engineering and computer science Create its container Les oignons c’est bon First layer : FROM debian:wheezy RUN apt−get update && apt−get install −y curl && rm −rf /var/lib/apt/ lists /∗ 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 19/30
  • 40. Faculty of Applied Sciences School of engineering and computer science Create its container Les oignons c’est bon First layer : FROM debian:wheezy RUN apt−get update && apt−get install −y curl && rm −rf /var/lib/apt/ lists /∗ Second layer : RUN curl −o /usr/local/bin/gosu −SL ”https://github.com/tianon/gosu/releases/download/1.2/gosu−$(dpkg −−print−architecture)” && gpg −−verify /usr/local/bin/gosu.asc && rm /usr/local/bin/gosu.asc && chmod +x /usr/local/bin/gosu 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 19/30
  • 41. Faculty of Applied Sciences School of engineering and computer science Create its container Les oignons c’est bon First layer : FROM debian:wheezy RUN apt−get update && apt−get install −y curl && rm −rf /var/lib/apt/ lists /∗ Second layer : RUN curl −o /usr/local/bin/gosu −SL ”https://github.com/tianon/gosu/releases/download/1.2/gosu−$(dpkg −−print−architecture)” && gpg −−verify /usr/local/bin/gosu.asc && rm /usr/local/bin/gosu.asc && chmod +x /usr/local/bin/gosu Third layer : ENV REDIS VERSION 2.8.19 ... 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 19/30
  • 42. Faculty of Applied Sciences School of engineering and computer science Create its container Les oignons c’est bon Step 0 : FROM ubuntu:14.04 ---> 2103b00b3fdf Step 1 : MAINTAINER Cytomine Team "support@cytomine.be" ---> Using cache ---> c544207d0347 Step 2 : RUN apt-get install -y openssh-server ---> Using cache ---> e4cefcd52418 ... Step 9 : EXPOSE 22 ---> Using cache ---> 3e0d97b94f3e Successfully built 3e0d97b94f3e Sending build context to Docker daemon 9.728 kB Sending build context to Docker daemon 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 20/30
  • 43. Faculty of Applied Sciences School of engineering and computer science Create its container Inheritance 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 21/30
  • 44. Faculty of Applied Sciences School of engineering and computer science Create its container Inheritance FROM redis MAINTAINER ”Cytomine Team support@cytomine.be” ... RUN echo ”deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main” | tee /etc/apt/sources.list .d/webupd8team−java.list RUN apt−key adv −−keyserver hkp://keyserver.ubuntu.com:80 −−recv−keys EEA14886 RUN apt−get install −y oracle−java8−installer ADD deploy.sh /tmp/deploy.sh RUN chmod +x /tmp/deploy.sh ENTRYPOINT [”/tmp/deploy.sh”] 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 21/30
  • 45. Faculty of Applied Sciences School of engineering and computer science Advantages Fig Weave DevOps Because we love Open Source ;-) 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 22/30
  • 46. Faculty of Applied Sciences School of engineering and computer science Advantages Fig 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 23/30
  • 47. Faculty of Applied Sciences School of engineering and computer science Advantages Before docker run -d redis docker build -t="web" . docker run -d -p 5000:5000 --link redis:redis -v .:/code --name web web After web: build: . ports: - "5000:5000" volumes: - .:/code links: - redis redis: image: redis So long fig ! Welcome to Docker Compose ! 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 24/30
  • 48. Faculty of Applied Sciences School of engineering and computer science Advantages Weave 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 25/30
  • 49. Faculty of Applied Sciences School of engineering and computer science Drawbacks Cache Step 0 : FROM ubuntu:14.04 ---> 2103b00b3fdf Step 1 : MAINTAINER Cytomine Team "support@cytomine.be" ---> Using cache ---> c544207d0347 Step 2 : RUN apt-get install -y openssh-server ---> Using cache ---> e4cefcd52418 ... The cache is used even if the above command doesn’t run anymore. 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 26/30
  • 50. Faculty of Applied Sciences School of engineering and computer science Drawbacks Cache Step 0 : FROM ubuntu:14.04 ---> 2103b00b3fdf Step 1 : MAINTAINER Cytomine Team "support@cytomine.be" ---> Using cache ---> c544207d0347 Step 2 : RUN apt-get install -y openssh-server ---> Using cache ---> e4cefcd52418 ... The cache is used even if the above command doesn’t run anymore. ⇒ Bad surprise during a clean installation. 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 26/30
  • 51. Faculty of Applied Sciences School of engineering and computer science Drawbacks No dynamic container linking if [ $APP1_ENABLED = true ] then docker run --link app1 ... (plenty lines) else if [ $APP2_ENABLED = true ] then docker run --link app2 ... (plenty lines) else ... fi 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 27/30
  • 52. Faculty of Applied Sciences School of engineering and computer science Drawbacks No dynamic container linking if [ $APP1_ENABLED = true ] then docker run --link app1 ... (plenty lines) else if [ $APP2_ENABLED = true ] then docker run --link app2 ... (plenty lines) else ... fi :s 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 27/30
  • 53. Faculty of Applied Sciences School of engineering and computer science Docker used in production Cytomine Architecture Diagram : 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 28/30
  • 54. Faculty of Applied Sciences School of engineering and computer science Devops My dev’ environment 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 29/30
  • 55. Faculty of Applied Sciences School of engineering and computer science The end Thanks ! 22 avril 2015 Docker Renaud Hoyoux - GIGA - Syst-Mod - Universit´e de Li`ege 30/30