SlideShare a Scribd company logo
First steps to a new development workflow
Guilhem Marty (@le_pixel)
1001pharmacies.com
@1001pharmaDev
Virtual Machines
First steps to docker
OS
Host Machine
Hypervisor
Guest OS Guest OS Guest OS Guest OS
App 1 App 2 App 2’ App 3
DB DB AMPQ
Bins/Libs Bins/Libs Bins/LibsBins/Libs
First steps to docker
First steps to docker
LXC
OS
Host Machine
Docker
App 1 App 2 App 2’ App 3
Bins/Libs Bins/LibsBins/Libs
[Yem@home]-[/var/www] $ docker pull debian:wheezy
[Yem@home]-[/var/www] $ docker run -i -t debian:wheezy /bin/bash
root@e3cfb271ab6e:/#
Run a container
[Yem@home]-[/var/www] $ docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL
SIZE
debian wheezy 1265e16d0c28 2 days ago 84.98 MB
FROM debian:wheezy
Dockerfile
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update 
&& apt-get install -y 
apache2 
php5 
mysql-client
EXPOSE 80
CMD ./usr/sbin/apache2ctl -D FOREGROUND
Build & Run
[Yem@home]-[/var/www] $ docker build -t app ./
[Yem@home]-[/var/www] $ docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL
SIZE
app latest 98a0cc8f6e58 6 seconds ago 169.9 MB
debian wheezy 1265e16d0c28 2 days ago 84.98 MB
[Yem@home]-[/var/www] $ docker run -d -P app
2c7082ee3b572d0743c0f09ecbab8a27a9a6ab70d354f901dc781feb1c835d21
[Yem@home]-[/var/www] $ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS
PORTS NAMES
9330f7f0947d app:latest "./usr/sbin/apache2c 15 minutes ago Up 15
minutes 0.0.0.0:49153->3306/tcp clever_feynman
First steps to docker
First steps to docker
[Yem@home]-[/var/www] $ docker run -d -P 
--name app-db 
-e "MYSQL_ROOT_PASSWORD=root" 
mariadb:10
Run a database
[Yem@home]-[/var/www] $ docker run -d -P 
--name app-db 
-e "MYSQL_ROOT_PASSWORD=root" 
mariadb:10
Link containers 1/2
[Yem@home]-[/var/www] $ docker run -d -P 
--name app-web 
--link app-db:db
app
/bin/bash
Link containers 2/2
root@55d016720713:/# cat /etc/hosts
172.17.0.4 55d016720713
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
172.17.0.2 db
root@55d016720713:/# mysql -u root -proot -h db -e "SHOW DATABASES;"
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
+--------------------+
First steps to docker
Questions ?

More Related Content

PPTX
Austin - Container Days - Docker 101
PPTX
What is Docker
PDF
Introduction to docker
PDF
Docker 101 - from 0 to Docker in 30 minutes
PDF
Docker 활용법: dumpdocker
PDF
Puppet and Vagrant in development
PPTX
Dockerfile Basics | Docker workshop #2 at twitter, 2013-11-05
PDF
Docker puebla bday #4 celebration
Austin - Container Days - Docker 101
What is Docker
Introduction to docker
Docker 101 - from 0 to Docker in 30 minutes
Docker 활용법: dumpdocker
Puppet and Vagrant in development
Dockerfile Basics | Docker workshop #2 at twitter, 2013-11-05
Docker puebla bday #4 celebration

What's hot (20)

PDF
Running Django on Docker: a workflow and code
PDF
From dev to prod: Kubernetes on AWS (short ver.)
PPTX
Hide your development environment and application in a container
PDF
The state of the swarm
PPTX
Docker workshop
PPTX
Dockerfile basics | docker workshop #1 at Rackspace
PDF
Rapid Development With Docker Compose
PDF
Docker 原理與實作
PPTX
Learn docker in 90 minutes
PDF
Docker by Example - Quiz
PDF
Docker at Djangocon 2013 | Talk by Ken Cochrane
PDF
Vagrant and docker
PDF
Docker by Example - Basics
PDF
Docker 101 - Intro to Docker
PPTX
Docker orchestration
PDF
Docker by Example - Basics
PDF
Docker for mere mortals
PPTX
Introduction to docker and oci
PDF
Vagrant + Docker provider [+Puppet]
PDF
OpenStack - Docker - Rackspace HQ
Running Django on Docker: a workflow and code
From dev to prod: Kubernetes on AWS (short ver.)
Hide your development environment and application in a container
The state of the swarm
Docker workshop
Dockerfile basics | docker workshop #1 at Rackspace
Rapid Development With Docker Compose
Docker 原理與實作
Learn docker in 90 minutes
Docker by Example - Quiz
Docker at Djangocon 2013 | Talk by Ken Cochrane
Vagrant and docker
Docker by Example - Basics
Docker 101 - Intro to Docker
Docker orchestration
Docker by Example - Basics
Docker for mere mortals
Introduction to docker and oci
Vagrant + Docker provider [+Puppet]
OpenStack - Docker - Rackspace HQ
Ad

Similar to First steps to docker (20)

PDF
A Hands-on Introduction to Docker
PDF
Streamline your development environment with docker
PPTX
Into to Docker (Central PA Java User Group - 8/14/2017)
PDF
桃園市教育局Docker技術入門與實作
PDF
What’s New in Docker - Victor Vieux, Docker
PDF
Docker module 1
PPTX
Develop with docker 2014 aug
PPTX
PPTX
Docker for Java developers at JavaLand
PPTX
Dockerizing a Symfony2 application
PDF
Wordpress y Docker, de desarrollo a produccion
PDF
The Modern Developer Toolbox
PPTX
WordPress Development Environments
POTX
Deploying .net core apps to Docker - dotnetConf Local Bengaluru
PDF
Ruby microservices with Docker - Sergii Koba
PPSX
Docker and containers - Presentation Slides by Priyadarshini Anand
PDF
Be a better developer with Docker (revision 3)
PPTX
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...
PDF
Fargate 를 이용한 ECS with VPC 1부
PDF
Dockerfiles building docker images automatically v (workdir, env, add, and ...
A Hands-on Introduction to Docker
Streamline your development environment with docker
Into to Docker (Central PA Java User Group - 8/14/2017)
桃園市教育局Docker技術入門與實作
What’s New in Docker - Victor Vieux, Docker
Docker module 1
Develop with docker 2014 aug
Docker for Java developers at JavaLand
Dockerizing a Symfony2 application
Wordpress y Docker, de desarrollo a produccion
The Modern Developer Toolbox
WordPress Development Environments
Deploying .net core apps to Docker - dotnetConf Local Bengaluru
Ruby microservices with Docker - Sergii Koba
Docker and containers - Presentation Slides by Priyadarshini Anand
Be a better developer with Docker (revision 3)
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...
Fargate 를 이용한 ECS with VPC 1부
Dockerfiles building docker images automatically v (workdir, env, add, and ...
Ad

Recently uploaded (20)

PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
DP Operators-handbook-extract for the Mautical Institute
PPTX
cloud_computing_Infrastucture_as_cloud_p
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
Tartificialntelligence_presentation.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
A Presentation on Artificial Intelligence
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PDF
WOOl fibre morphology and structure.pdf for textiles
PDF
Approach and Philosophy of On baking technology
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PPTX
1. Introduction to Computer Programming.pptx
PDF
Mushroom cultivation and it's methods.pdf
Univ-Connecticut-ChatGPT-Presentaion.pdf
SOPHOS-XG Firewall Administrator PPT.pptx
1 - Historical Antecedents, Social Consideration.pdf
DP Operators-handbook-extract for the Mautical Institute
cloud_computing_Infrastucture_as_cloud_p
MIND Revenue Release Quarter 2 2025 Press Release
Tartificialntelligence_presentation.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
A novel scalable deep ensemble learning framework for big data classification...
Unlocking AI with Model Context Protocol (MCP)
A Presentation on Artificial Intelligence
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
WOOl fibre morphology and structure.pdf for textiles
Approach and Philosophy of On baking technology
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
1. Introduction to Computer Programming.pptx
Mushroom cultivation and it's methods.pdf

First steps to docker

  • 1. First steps to a new development workflow Guilhem Marty (@le_pixel) 1001pharmacies.com @1001pharmaDev
  • 4. OS Host Machine Hypervisor Guest OS Guest OS Guest OS Guest OS App 1 App 2 App 2’ App 3 DB DB AMPQ Bins/Libs Bins/Libs Bins/LibsBins/Libs
  • 7. LXC
  • 8. OS Host Machine Docker App 1 App 2 App 2’ App 3 Bins/Libs Bins/LibsBins/Libs
  • 9. [Yem@home]-[/var/www] $ docker pull debian:wheezy [Yem@home]-[/var/www] $ docker run -i -t debian:wheezy /bin/bash root@e3cfb271ab6e:/# Run a container [Yem@home]-[/var/www] $ docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE debian wheezy 1265e16d0c28 2 days ago 84.98 MB
  • 10. FROM debian:wheezy Dockerfile ENV DEBIAN_FRONTEND noninteractive RUN apt-get update && apt-get install -y apache2 php5 mysql-client EXPOSE 80 CMD ./usr/sbin/apache2ctl -D FOREGROUND
  • 11. Build & Run [Yem@home]-[/var/www] $ docker build -t app ./ [Yem@home]-[/var/www] $ docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE app latest 98a0cc8f6e58 6 seconds ago 169.9 MB debian wheezy 1265e16d0c28 2 days ago 84.98 MB [Yem@home]-[/var/www] $ docker run -d -P app 2c7082ee3b572d0743c0f09ecbab8a27a9a6ab70d354f901dc781feb1c835d21 [Yem@home]-[/var/www] $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 9330f7f0947d app:latest "./usr/sbin/apache2c 15 minutes ago Up 15 minutes 0.0.0.0:49153->3306/tcp clever_feynman
  • 14. [Yem@home]-[/var/www] $ docker run -d -P --name app-db -e "MYSQL_ROOT_PASSWORD=root" mariadb:10 Run a database
  • 15. [Yem@home]-[/var/www] $ docker run -d -P --name app-db -e "MYSQL_ROOT_PASSWORD=root" mariadb:10 Link containers 1/2 [Yem@home]-[/var/www] $ docker run -d -P --name app-web --link app-db:db app /bin/bash
  • 16. Link containers 2/2 root@55d016720713:/# cat /etc/hosts 172.17.0.4 55d016720713 127.0.0.1 localhost ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters 172.17.0.2 db root@55d016720713:/# mysql -u root -proot -h db -e "SHOW DATABASES;" +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | +--------------------+