SlideShare uma empresa Scribd logo
1 de 35
Baixar para ler offline
Docker Paris meetup #1 – 10/02/2013
Victor Vieux, dotCloud Inc.
@vieux
Outline
•  Intro to Docker
•  Installing Docker
•  Basic commands
•  Demo: Simple deployment
•  Questions
Quick survey
•  How many people have heard of Docker
before this Meetup ?
•  How many people have tried Docker ?
•  How many people are using Docker in
production ?
Introduction to Docker
Origins of Docker
•  Docker is a rewrite of similar code that
currently powers the dotCloud PaaS
•  Original version written in Python (like
dotCloud PaaS), now written in Go
•  It’s a young project (~6 months), but with a
huge community.
Docker Timeline
•  January 2013 Docker started as an internal project
inside of dotCloud
•  March 21, 2013 Solomon gives Docker lightning
talk a PyCon US
•  March 27, 2013 Docker 0.1 released to Public
•  September 4, 2013 Docker merged into Openstack
for the Havana release
•  September 19, 2013 Partnership with Red Hat
around OpenShift
•  September 27, 2013 Docker 0.6.3 released
In the first 6 months
•  6000+ Github stars
•  150+ Contributors
•  50,000+ docker index pull
•  100’s of projects built on top of Docker
– UIs (DockerUI, Shipyard, Dockland…)
– Open Source PaaS (DEIS, Flynn, Dokku…)
– Continuous Deployment (Strider…)
•  1700’s Dockerized applications on Github
What is Docker ?
“Docker is an open-source engine to
easily create lightweight, portable,
self-sufficient containers from any
application. The same container that
a developer builds and test on a
laptop can run at scale, in production,
on VMs, OpenStack cluster, public
clouds and more.”
How does Docker work ?
•  LinuX Containers (LXC)
•  Control Groups & Namespaces
•  AUFS
•  Client – Server with an HTTP API
LinuX Containers (LCX)
•  Let’s your run a Linux system within another
Linux system
•  A container is a group of processes on a
Linux box, put together is an isolated
environment
•  From the inside, it looks like a VM
•  From the outside, it looks like normal
processes
•  “chroot on steroids”
Why Containers?
•  Speed: Boots in seconds
•  Footprint: 100-1000 containers on one
machine. Small disk requirements
Containers vs. VMs
Control Groups & Namespaces
Linux kernel feature to limit, account and
isolate resource usage, such as:
– CPU
– Memory
– Disk I/O
AUFS
	
  
•  File system that implements union mount.
	
  
	
  
	
  
•  Supports Copy On Write (COW):
	
  
	
  
	
  
# mount –t aufs –o br=/files1:/files2 none /files
	
  
	
  
	
  
# mount –t aufs –o br=/tmp=rw:/bin=ro none /files
	
  
	
  
Installing Docker
Requirements
•  Linux Kernel 3.8 or above
•  AUFS
•  LXC
•  64-bit
Installations
•  Ubuntu Linux
•  Binaries
•  Using Vagrant
More on: http://docs.docker.io/en/latest/installation
Installation: Ubuntu Linux
•  AUFS support
$> sudo apt-get update
$> sudo apt-get intall linux-image-extra-`uname –r`
•  Add Docker repository
$> sudo sh –c “curl https://get.docker.io/gpg | apt-key add -”
$> sudo sh –c “echo deb http://get.docker.io/ubuntu docker 
main > /etc/apt/sources.list.d/docker.list”
•  Install
$> sudo apt-get update
$> sudo apt-get install lxc-docker
Installation: Binaries
•  Get the docker binary
$> wget –output-document=docker https://get.docker.io/builds/
Linux/x86_64/docker-latest
$> chmod +x docker
•  Run the docker daemon
$> sudo ./docker –d &
•  Use your own system startup script
	
  
Installation: Vagrant
•  Clone the Docker repository
$> git clone https://github.com/dotcloud/docker.git
•  Startup the vagrant image
$> vagrant up
	
  
•  SSH into the image
$> vagrant ssh
•  Docker client works on Mac
Basic	
  commands	
  
Classic: hello world
•  Get one base image (ubuntu, centos, busybox,…)
$> docker pull ubuntu
•  List images on your system
$> docker images
	
  
	
  
•  Print hello world
$> docker run ubuntu:12.10 echo “hello world”
	
  
Detached mode
•  Run	
  in	
  Docker	
  using	
  the	
  detach	
  flag	
  (-­‐d)	
  
$> docker run –d ubuntu sh –c “while true; do echo hello
world; sleep 1; done”
•  Get	
  container’s	
  id	
  
$> docker ps
•  A:ach	
  to	
  the	
  container	
  
$> docker attach <container_id>
	
  
•  Stop/Start/Restart	
  the	
  container	
  
$> docker stop <container_id>
	
  
Containers vs Images
•  Remove a file from an image
$> docker run busybox rm /etc/passwd
•  The file is still there ??
$> docker run busybox cat /etc/passwd
•  Commit the newly created to an image
$> docker ps –n=2 #get the container’s id
$> docker commit <id> vieux/broken-busybox
	
  
•  The file is gone
$> docker run vieux/broken-busybox cat /etc/passwd
Public Index & Network
•  Pull an apache image from the public index
$> docker search apache
$> docker pull creack/apache2
•  Run the image and check the ports
$> docker run –d creack/apache2
$> docker ps
•  Expose public ports
$> docker run –d –p 8888:80 –p 4444:443 creack/apache2
$> docker ps
	
  
Creating your 1st app: the interactive way
•  Using docker in interactive mode
$> docker run –i –t ubuntu bash
root@82c63ee50c3d:/#
root@82c63ee50c3d:/# apt-get update
[…]
root@82c63ee50c3d:/# apt-get install memcached
[…]
root@82c63ee50c3d:/# exit
•  Commit the image
$> docker commit `docker ps –q –l` vieux/memcached
•  Start the image
$> docker run –d –p 11211 –u daemon vieux/memcached memcached
Creating your 1st app: the boring way
•  Multiple run / commit
$> docker run ubuntu apt-get update
$> $ID=(docker commit `docker ps –q –l`)
$> docker run $ID apt-get install memcached
$> docker commit `docker ps –q –l vieux/memcached
•  Define default configuration at commit
$> docker commit –run=‘{“Entrypoint”: [“memcached”]}’ […]
•  Start the image
$> docker run –d –p 11211 –u daemon vieux/memcached
Creating your 1st app: the scripted way
•  Write a Dockerfile
# Memcached
FROM ubuntu
MAINTAINER Victor Vieux <victor@dotcloud.com>
RUN apt-get update
RUN apt-get install –y memcached
ENTRYPOINT [“memcached”]
USER daemon
EXPOSE 11211
•  Buid the image
$> docker build –t=vieux/memcached .
•  Start the image
$> docker run –d vieux/memcached memcached
Volumes and bind mounts
•  Put your persistent data in a volume
$> $ID=(docker run –d –v /var/lib/mysql vieux/mysql)
•  So you can re use it in another container
$> docker run –d –volumes-from=$ID vieux/mysql
	
  
•  Bind mounts
$> docker run –d –v /home/vv:/home <image>
•  Supports read only / read write
$> docker run –d –v host/path:container/path:rw <image>
Other commands
•  docker cp #copy a file from container to host
•  docker diff #print container changes
•  docker top #display running processes inside a container
•  docker rm/rmi #delete container/image
•  docker wait #wait until container stop and print exit code
More on: http://docs.docker.io/en/latest/commandline/cli
Demo:
Simple deployment
Local development
•  App running in prod
http://ks3100989.kimsufi.com:8080/
•  Build local
	
  $> docker build –t=gcm .
•  Test local
$> docker run –p 49200:8080 gcm
	
  http://localhost:49200
•  Change some files
•  Rebuild & test
$> docker build –t=gcm .
$> docker run –p 49200:8080 gcm
Push to prod
•  Tag image in order to push it
$> docker tag gcm ks3100989.kimsufi.com:5000/gcm
•  Push image to local registry
$> docker push ks3100989.kimsufi.com:5000/gcm
•  On production server, download image
$> docker pull ks3100989.kimsufi.com:5000/gcm
•  Restart the container
$> docker stop <container_id>
$> docker run –d –p 8080:8080 <image>
Questions ?
Thank you!
@vieux

Mais conteúdo relacionado

Mais procurados

Docker: From Zero to Hero
Docker: From Zero to HeroDocker: From Zero to Hero
Docker: From Zero to Herofazalraja
 
Docker Swarm 0.2.0
Docker Swarm 0.2.0Docker Swarm 0.2.0
Docker Swarm 0.2.0Docker, Inc.
 
Container Security
Container SecurityContainer Security
Container SecuritySalman Baset
 
Docker introduction &amp; benefits
Docker introduction &amp; benefitsDocker introduction &amp; benefits
Docker introduction &amp; benefitsAmit Manwade
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker IntroductionPeng Xiao
 
Introduction to Docker - VIT Campus
Introduction to Docker - VIT CampusIntroduction to Docker - VIT Campus
Introduction to Docker - VIT CampusAjeet Singh Raina
 
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...Simplilearn
 
Introduction To Docker, Docker Compose, Docker Swarm
Introduction To Docker, Docker Compose, Docker SwarmIntroduction To Docker, Docker Compose, Docker Swarm
Introduction To Docker, Docker Compose, Docker SwarmAn Nguyen
 
Docker 101 : Introduction to Docker and Containers
Docker 101 : Introduction to Docker and ContainersDocker 101 : Introduction to Docker and Containers
Docker 101 : Introduction to Docker and ContainersYajushi Srivastava
 
Docker 101 - Nov 2016
Docker 101 - Nov 2016Docker 101 - Nov 2016
Docker 101 - Nov 2016Docker, Inc.
 

Mais procurados (20)

Docker Basics
Docker BasicsDocker Basics
Docker Basics
 
Docker internals
Docker internalsDocker internals
Docker internals
 
Docker in real life
Docker in real lifeDocker in real life
Docker in real life
 
Docker: From Zero to Hero
Docker: From Zero to HeroDocker: From Zero to Hero
Docker: From Zero to Hero
 
Docker Swarm 0.2.0
Docker Swarm 0.2.0Docker Swarm 0.2.0
Docker Swarm 0.2.0
 
Container Security
Container SecurityContainer Security
Container Security
 
Docker Basics
Docker BasicsDocker Basics
Docker Basics
 
Docker introduction &amp; benefits
Docker introduction &amp; benefitsDocker introduction &amp; benefits
Docker introduction &amp; benefits
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Introduction to Docker - VIT Campus
Introduction to Docker - VIT CampusIntroduction to Docker - VIT Campus
Introduction to Docker - VIT Campus
 
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
Introduction To Docker, Docker Compose, Docker Swarm
Introduction To Docker, Docker Compose, Docker SwarmIntroduction To Docker, Docker Compose, Docker Swarm
Introduction To Docker, Docker Compose, Docker Swarm
 
Docker by Example - Basics
Docker by Example - Basics Docker by Example - Basics
Docker by Example - Basics
 
Docker, LinuX Container
Docker, LinuX ContainerDocker, LinuX Container
Docker, LinuX Container
 
Docker 101 : Introduction to Docker and Containers
Docker 101 : Introduction to Docker and ContainersDocker 101 : Introduction to Docker and Containers
Docker 101 : Introduction to Docker and Containers
 
Docker basics
Docker basicsDocker basics
Docker basics
 
What is Docker
What is DockerWhat is Docker
What is Docker
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Docker 101 - Nov 2016
Docker 101 - Nov 2016Docker 101 - Nov 2016
Docker 101 - Nov 2016
 

Destaque

Docker introduction
Docker introductionDocker introduction
Docker introductiondotCloud
 
Docker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker, Inc.
 
Docker presentation
Docker presentationDocker presentation
Docker presentationWes Eklund
 
On the use of radio resource tests in wireless ad hoc networks
On the use of radio resource tests in wireless ad hoc networksOn the use of radio resource tests in wireless ad hoc networks
On the use of radio resource tests in wireless ad hoc networksDiogo Mónica
 
Offnet- Offline Mobile Application
Offnet- Offline Mobile ApplicationOffnet- Offline Mobile Application
Offnet- Offline Mobile ApplicationSudip Adhikari
 
From 0 to 0xdeadbeef - security mistakes that will haunt your startup
From 0 to 0xdeadbeef - security mistakes that will haunt your startupFrom 0 to 0xdeadbeef - security mistakes that will haunt your startup
From 0 to 0xdeadbeef - security mistakes that will haunt your startupDiogo Mónica
 
Leveraging Honest Users: Stealth Command-and-Control of Botnets
Leveraging Honest Users: Stealth Command-and-Control of BotnetsLeveraging Honest Users: Stealth Command-and-Control of Botnets
Leveraging Honest Users: Stealth Command-and-Control of BotnetsDiogo Mónica
 
PhD Thesis Diogo Mónica
PhD Thesis Diogo MónicaPhD Thesis Diogo Mónica
PhD Thesis Diogo MónicaDiogo Mónica
 
An IDS for browser hijacking
An IDS for browser hijackingAn IDS for browser hijacking
An IDS for browser hijackingDiogo Mónica
 
WiFiHop - mitigating the Evil twin attack through multi-hop detection
WiFiHop - mitigating the Evil twin attack through multi-hop detectionWiFiHop - mitigating the Evil twin attack through multi-hop detection
WiFiHop - mitigating the Evil twin attack through multi-hop detectionDiogo Mónica
 
ZFS Tutorial LISA 2011
ZFS Tutorial LISA 2011ZFS Tutorial LISA 2011
ZFS Tutorial LISA 2011Richard Elling
 
Observable Non-Sybil Quorums Construction in One-Hop Wireless Ad Hoc Networks
Observable Non-Sybil Quorums Construction in One-Hop Wireless Ad Hoc NetworksObservable Non-Sybil Quorums Construction in One-Hop Wireless Ad Hoc Networks
Observable Non-Sybil Quorums Construction in One-Hop Wireless Ad Hoc NetworksDiogo Mónica
 
Secure Software Distribution in an Adversarial World
Secure Software Distribution in an Adversarial WorldSecure Software Distribution in an Adversarial World
Secure Software Distribution in an Adversarial WorldDiogo Mónica
 
MultiPath TCP - The path to multipath
MultiPath TCP - The path to multipathMultiPath TCP - The path to multipath
MultiPath TCP - The path to multipathDiogo Mónica
 
ESORICS 2014: Local Password validation using Self-Organizing Maps
ESORICS 2014: Local Password validation using Self-Organizing MapsESORICS 2014: Local Password validation using Self-Organizing Maps
ESORICS 2014: Local Password validation using Self-Organizing MapsDiogo Mónica
 
DockerCon Keynote Ben Golub
DockerCon Keynote Ben GolubDockerCon Keynote Ben Golub
DockerCon Keynote Ben GolubdotCloud
 
MTLS in a Microservices World
MTLS in a Microservices WorldMTLS in a Microservices World
MTLS in a Microservices WorldDiogo Mónica
 
Decomposing applications for deployability and scalability #springone2gx #s12gx
Decomposing applications for deployability and scalability #springone2gx #s12gxDecomposing applications for deployability and scalability #springone2gx #s12gx
Decomposing applications for deployability and scalability #springone2gx #s12gxChris Richardson
 

Destaque (20)

Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Docker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker 101: Introduction to Docker
Docker 101: Introduction to Docker
 
Docker presentation
Docker presentationDocker presentation
Docker presentation
 
On the use of radio resource tests in wireless ad hoc networks
On the use of radio resource tests in wireless ad hoc networksOn the use of radio resource tests in wireless ad hoc networks
On the use of radio resource tests in wireless ad hoc networks
 
Offnet- Offline Mobile Application
Offnet- Offline Mobile ApplicationOffnet- Offline Mobile Application
Offnet- Offline Mobile Application
 
From 0 to 0xdeadbeef - security mistakes that will haunt your startup
From 0 to 0xdeadbeef - security mistakes that will haunt your startupFrom 0 to 0xdeadbeef - security mistakes that will haunt your startup
From 0 to 0xdeadbeef - security mistakes that will haunt your startup
 
Leveraging Honest Users: Stealth Command-and-Control of Botnets
Leveraging Honest Users: Stealth Command-and-Control of BotnetsLeveraging Honest Users: Stealth Command-and-Control of Botnets
Leveraging Honest Users: Stealth Command-and-Control of Botnets
 
PhD Thesis Diogo Mónica
PhD Thesis Diogo MónicaPhD Thesis Diogo Mónica
PhD Thesis Diogo Mónica
 
An IDS for browser hijacking
An IDS for browser hijackingAn IDS for browser hijacking
An IDS for browser hijacking
 
WiFiHop - mitigating the Evil twin attack through multi-hop detection
WiFiHop - mitigating the Evil twin attack through multi-hop detectionWiFiHop - mitigating the Evil twin attack through multi-hop detection
WiFiHop - mitigating the Evil twin attack through multi-hop detection
 
ZFS Tutorial LISA 2011
ZFS Tutorial LISA 2011ZFS Tutorial LISA 2011
ZFS Tutorial LISA 2011
 
Observable Non-Sybil Quorums Construction in One-Hop Wireless Ad Hoc Networks
Observable Non-Sybil Quorums Construction in One-Hop Wireless Ad Hoc NetworksObservable Non-Sybil Quorums Construction in One-Hop Wireless Ad Hoc Networks
Observable Non-Sybil Quorums Construction in One-Hop Wireless Ad Hoc Networks
 
Secure Software Distribution in an Adversarial World
Secure Software Distribution in an Adversarial WorldSecure Software Distribution in an Adversarial World
Secure Software Distribution in an Adversarial World
 
MultiPath TCP - The path to multipath
MultiPath TCP - The path to multipathMultiPath TCP - The path to multipath
MultiPath TCP - The path to multipath
 
ESORICS 2014: Local Password validation using Self-Organizing Maps
ESORICS 2014: Local Password validation using Self-Organizing MapsESORICS 2014: Local Password validation using Self-Organizing Maps
ESORICS 2014: Local Password validation using Self-Organizing Maps
 
HAProxy
HAProxy HAProxy
HAProxy
 
DockerCon Keynote Ben Golub
DockerCon Keynote Ben GolubDockerCon Keynote Ben Golub
DockerCon Keynote Ben Golub
 
MTLS in a Microservices World
MTLS in a Microservices WorldMTLS in a Microservices World
MTLS in a Microservices World
 
MicroServices on Azure
MicroServices on AzureMicroServices on Azure
MicroServices on Azure
 
Decomposing applications for deployability and scalability #springone2gx #s12gx
Decomposing applications for deployability and scalability #springone2gx #s12gxDecomposing applications for deployability and scalability #springone2gx #s12gx
Decomposing applications for deployability and scalability #springone2gx #s12gx
 

Semelhante a Docker presentation | Paris Docker Meetup

Running the Oracle SOA Suite Environment in a Docker Container
Running the Oracle SOA Suite Environment in a Docker ContainerRunning the Oracle SOA Suite Environment in a Docker Container
Running the Oracle SOA Suite Environment in a Docker ContainerGuido Schmutz
 
Docker workshop
Docker workshopDocker workshop
Docker workshopEvans Ye
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to DockerKuan Yen Heng
 
Tech talk on docker with demo
Tech talk on docker with demoTech talk on docker with demo
Tech talk on docker with demoSandeep Karnawat
 
1 docker first_linux_container_hands_on
1 docker first_linux_container_hands_on 1 docker first_linux_container_hands_on
1 docker first_linux_container_hands_on FEG
 
Docker from A to Z, including Swarm and OCCS
Docker from A to Z, including Swarm and OCCSDocker from A to Z, including Swarm and OCCS
Docker from A to Z, including Swarm and OCCSFrank Munz
 
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
 
Docker at Djangocon 2013 | Talk by Ken Cochrane
Docker at Djangocon 2013 | Talk by Ken CochraneDocker at Djangocon 2013 | Talk by Ken Cochrane
Docker at Djangocon 2013 | Talk by Ken CochranedotCloud
 
Docker for the new Era: Introducing Docker,its components and tools
Docker for the new Era: Introducing Docker,its components and toolsDocker for the new Era: Introducing Docker,its components and tools
Docker for the new Era: Introducing Docker,its components and toolsRamit Surana
 
Docker and the Container Ecosystem
Docker and the Container EcosystemDocker and the Container Ecosystem
Docker and the Container Ecosystempsconnolly
 
Docker for mere mortals
Docker for mere mortalsDocker for mere mortals
Docker for mere mortalsHenryk Konsek
 
Using Docker with OpenStack - Hands On!
 Using Docker with OpenStack - Hands On! Using Docker with OpenStack - Hands On!
Using Docker with OpenStack - Hands On!Adrian Otto
 

Semelhante a Docker presentation | Paris Docker Meetup (20)

Running the Oracle SOA Suite Environment in a Docker Container
Running the Oracle SOA Suite Environment in a Docker ContainerRunning the Oracle SOA Suite Environment in a Docker Container
Running the Oracle SOA Suite Environment in a Docker Container
 
Docker workshop
Docker workshopDocker workshop
Docker workshop
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Tech talk on docker with demo
Tech talk on docker with demoTech talk on docker with demo
Tech talk on docker with demo
 
Docker 2014
Docker 2014Docker 2014
Docker 2014
 
1 docker first_linux_container_hands_on
1 docker first_linux_container_hands_on 1 docker first_linux_container_hands_on
1 docker first_linux_container_hands_on
 
Docker, but what it is?
Docker, but what it is?Docker, but what it is?
Docker, but what it is?
 
Docker from A to Z, including Swarm and OCCS
Docker from A to Z, including Swarm and OCCSDocker from A to Z, including Swarm and OCCS
Docker from A to Z, including Swarm and OCCS
 
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
 
Django and Docker
Django and DockerDjango and Docker
Django and Docker
 
Docker at Djangocon 2013 | Talk by Ken Cochrane
Docker at Djangocon 2013 | Talk by Ken CochraneDocker at Djangocon 2013 | Talk by Ken Cochrane
Docker at Djangocon 2013 | Talk by Ken Cochrane
 
Introduction To Docker
Introduction To DockerIntroduction To Docker
Introduction To Docker
 
Docker presentation
Docker presentationDocker presentation
Docker presentation
 
Docker From Scratch
Docker From ScratchDocker From Scratch
Docker From Scratch
 
Docker
DockerDocker
Docker
 
Docker for the new Era: Introducing Docker,its components and tools
Docker for the new Era: Introducing Docker,its components and toolsDocker for the new Era: Introducing Docker,its components and tools
Docker for the new Era: Introducing Docker,its components and tools
 
Docker Ecosystem on Azure
Docker Ecosystem on AzureDocker Ecosystem on Azure
Docker Ecosystem on Azure
 
Docker and the Container Ecosystem
Docker and the Container EcosystemDocker and the Container Ecosystem
Docker and the Container Ecosystem
 
Docker for mere mortals
Docker for mere mortalsDocker for mere mortals
Docker for mere mortals
 
Using Docker with OpenStack - Hands On!
 Using Docker with OpenStack - Hands On! Using Docker with OpenStack - Hands On!
Using Docker with OpenStack - Hands On!
 

Mais de dotCloud

Immutable infrastructure with Docker and EC2
Immutable infrastructure with Docker and EC2Immutable infrastructure with Docker and EC2
Immutable infrastructure with Docker and EC2dotCloud
 
Docker at Spotify - Dockercon14
Docker at Spotify - Dockercon14Docker at Spotify - Dockercon14
Docker at Spotify - Dockercon14dotCloud
 
John Engates Keynote at Dockercon 14
John Engates Keynote at Dockercon 14John Engates Keynote at Dockercon 14
John Engates Keynote at Dockercon 14dotCloud
 
Building a smarter application Stack by Tomas Doran from Yelp
Building a smarter application Stack by Tomas Doran from YelpBuilding a smarter application Stack by Tomas Doran from Yelp
Building a smarter application Stack by Tomas Doran from YelpdotCloud
 
Are VM Passé?
Are VM Passé? Are VM Passé?
Are VM Passé? dotCloud
 
OpenStack - Docker - Rackspace HQ
OpenStack - Docker - Rackspace HQOpenStack - Docker - Rackspace HQ
OpenStack - Docker - Rackspace HQdotCloud
 
Docker in pratice -chenyifei
Docker in pratice -chenyifeiDocker in pratice -chenyifei
Docker in pratice -chenyifeidotCloud
 
Wot2013云计算架构师峰会 -陈轶飞2
Wot2013云计算架构师峰会 -陈轶飞2Wot2013云计算架构师峰会 -陈轶飞2
Wot2013云计算架构师峰会 -陈轶飞2dotCloud
 
Deploying containers and managing them on multiple Docker hosts, Docker Meetu...
Deploying containers and managing them on multiple Docker hosts, Docker Meetu...Deploying containers and managing them on multiple Docker hosts, Docker Meetu...
Deploying containers and managing them on multiple Docker hosts, Docker Meetu...dotCloud
 
Introduction to Docker and all things containers, Docker Meetup at RelateIQ
Introduction to Docker and all things containers, Docker Meetup at RelateIQIntroduction to Docker and all things containers, Docker Meetup at RelateIQ
Introduction to Docker and all things containers, Docker Meetup at RelateIQdotCloud
 
Introduction to dockerfile, SF Peninsula Software Development Meetup @Guidewire
Introduction to dockerfile, SF Peninsula Software Development Meetup @Guidewire Introduction to dockerfile, SF Peninsula Software Development Meetup @Guidewire
Introduction to dockerfile, SF Peninsula Software Development Meetup @Guidewire dotCloud
 
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
Introduction to Docker at SF Peninsula Software Development Meetup @GuidewireIntroduction to Docker at SF Peninsula Software Development Meetup @Guidewire
Introduction to Docker at SF Peninsula Software Development Meetup @GuidewiredotCloud
 
Dockerizing stashboard - Docker meetup at Twilio
Dockerizing stashboard - Docker meetup at TwilioDockerizing stashboard - Docker meetup at Twilio
Dockerizing stashboard - Docker meetup at TwiliodotCloud
 
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013dotCloud
 
Dockerizing your applications - Docker workshop @Twitter
Dockerizing your applications - Docker workshop @TwitterDockerizing your applications - Docker workshop @Twitter
Dockerizing your applications - Docker workshop @TwitterdotCloud
 
Introduction to Docker - Docker workshop @Twitter
Introduction to Docker - Docker workshop @TwitterIntroduction to Docker - Docker workshop @Twitter
Introduction to Docker - Docker workshop @TwitterdotCloud
 
Docker worshop @Twitter - How to use your own private registry
Docker worshop @Twitter - How to use your own private registryDocker worshop @Twitter - How to use your own private registry
Docker worshop @Twitter - How to use your own private registrydotCloud
 
Docker links | Docker workshop #2 at Twitter
Docker links | Docker workshop #2 at TwitterDocker links | Docker workshop #2 at Twitter
Docker links | Docker workshop #2 at TwitterdotCloud
 
Dockerfile Basics | Docker workshop #2 at twitter, 2013-11-05
Dockerfile Basics | Docker workshop #2 at twitter, 2013-11-05Dockerfile Basics | Docker workshop #2 at twitter, 2013-11-05
Dockerfile Basics | Docker workshop #2 at twitter, 2013-11-05dotCloud
 
Intro Docker october 2013
Intro Docker october 2013Intro Docker october 2013
Intro Docker october 2013dotCloud
 

Mais de dotCloud (20)

Immutable infrastructure with Docker and EC2
Immutable infrastructure with Docker and EC2Immutable infrastructure with Docker and EC2
Immutable infrastructure with Docker and EC2
 
Docker at Spotify - Dockercon14
Docker at Spotify - Dockercon14Docker at Spotify - Dockercon14
Docker at Spotify - Dockercon14
 
John Engates Keynote at Dockercon 14
John Engates Keynote at Dockercon 14John Engates Keynote at Dockercon 14
John Engates Keynote at Dockercon 14
 
Building a smarter application Stack by Tomas Doran from Yelp
Building a smarter application Stack by Tomas Doran from YelpBuilding a smarter application Stack by Tomas Doran from Yelp
Building a smarter application Stack by Tomas Doran from Yelp
 
Are VM Passé?
Are VM Passé? Are VM Passé?
Are VM Passé?
 
OpenStack - Docker - Rackspace HQ
OpenStack - Docker - Rackspace HQOpenStack - Docker - Rackspace HQ
OpenStack - Docker - Rackspace HQ
 
Docker in pratice -chenyifei
Docker in pratice -chenyifeiDocker in pratice -chenyifei
Docker in pratice -chenyifei
 
Wot2013云计算架构师峰会 -陈轶飞2
Wot2013云计算架构师峰会 -陈轶飞2Wot2013云计算架构师峰会 -陈轶飞2
Wot2013云计算架构师峰会 -陈轶飞2
 
Deploying containers and managing them on multiple Docker hosts, Docker Meetu...
Deploying containers and managing them on multiple Docker hosts, Docker Meetu...Deploying containers and managing them on multiple Docker hosts, Docker Meetu...
Deploying containers and managing them on multiple Docker hosts, Docker Meetu...
 
Introduction to Docker and all things containers, Docker Meetup at RelateIQ
Introduction to Docker and all things containers, Docker Meetup at RelateIQIntroduction to Docker and all things containers, Docker Meetup at RelateIQ
Introduction to Docker and all things containers, Docker Meetup at RelateIQ
 
Introduction to dockerfile, SF Peninsula Software Development Meetup @Guidewire
Introduction to dockerfile, SF Peninsula Software Development Meetup @Guidewire Introduction to dockerfile, SF Peninsula Software Development Meetup @Guidewire
Introduction to dockerfile, SF Peninsula Software Development Meetup @Guidewire
 
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
Introduction to Docker at SF Peninsula Software Development Meetup @GuidewireIntroduction to Docker at SF Peninsula Software Development Meetup @Guidewire
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
 
Dockerizing stashboard - Docker meetup at Twilio
Dockerizing stashboard - Docker meetup at TwilioDockerizing stashboard - Docker meetup at Twilio
Dockerizing stashboard - Docker meetup at Twilio
 
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
 
Dockerizing your applications - Docker workshop @Twitter
Dockerizing your applications - Docker workshop @TwitterDockerizing your applications - Docker workshop @Twitter
Dockerizing your applications - Docker workshop @Twitter
 
Introduction to Docker - Docker workshop @Twitter
Introduction to Docker - Docker workshop @TwitterIntroduction to Docker - Docker workshop @Twitter
Introduction to Docker - Docker workshop @Twitter
 
Docker worshop @Twitter - How to use your own private registry
Docker worshop @Twitter - How to use your own private registryDocker worshop @Twitter - How to use your own private registry
Docker worshop @Twitter - How to use your own private registry
 
Docker links | Docker workshop #2 at Twitter
Docker links | Docker workshop #2 at TwitterDocker links | Docker workshop #2 at Twitter
Docker links | Docker workshop #2 at Twitter
 
Dockerfile Basics | Docker workshop #2 at twitter, 2013-11-05
Dockerfile Basics | Docker workshop #2 at twitter, 2013-11-05Dockerfile Basics | Docker workshop #2 at twitter, 2013-11-05
Dockerfile Basics | Docker workshop #2 at twitter, 2013-11-05
 
Intro Docker october 2013
Intro Docker october 2013Intro Docker october 2013
Intro Docker october 2013
 

Último

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 

Último (20)

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 

Docker presentation | Paris Docker Meetup

  • 1. Docker Paris meetup #1 – 10/02/2013 Victor Vieux, dotCloud Inc. @vieux
  • 2. Outline •  Intro to Docker •  Installing Docker •  Basic commands •  Demo: Simple deployment •  Questions
  • 3. Quick survey •  How many people have heard of Docker before this Meetup ? •  How many people have tried Docker ? •  How many people are using Docker in production ?
  • 5. Origins of Docker •  Docker is a rewrite of similar code that currently powers the dotCloud PaaS •  Original version written in Python (like dotCloud PaaS), now written in Go •  It’s a young project (~6 months), but with a huge community.
  • 6. Docker Timeline •  January 2013 Docker started as an internal project inside of dotCloud •  March 21, 2013 Solomon gives Docker lightning talk a PyCon US •  March 27, 2013 Docker 0.1 released to Public •  September 4, 2013 Docker merged into Openstack for the Havana release •  September 19, 2013 Partnership with Red Hat around OpenShift •  September 27, 2013 Docker 0.6.3 released
  • 7. In the first 6 months •  6000+ Github stars •  150+ Contributors •  50,000+ docker index pull •  100’s of projects built on top of Docker – UIs (DockerUI, Shipyard, Dockland…) – Open Source PaaS (DEIS, Flynn, Dokku…) – Continuous Deployment (Strider…) •  1700’s Dockerized applications on Github
  • 8. What is Docker ? “Docker is an open-source engine to easily create lightweight, portable, self-sufficient containers from any application. The same container that a developer builds and test on a laptop can run at scale, in production, on VMs, OpenStack cluster, public clouds and more.”
  • 9. How does Docker work ? •  LinuX Containers (LXC) •  Control Groups & Namespaces •  AUFS •  Client – Server with an HTTP API
  • 10. LinuX Containers (LCX) •  Let’s your run a Linux system within another Linux system •  A container is a group of processes on a Linux box, put together is an isolated environment •  From the inside, it looks like a VM •  From the outside, it looks like normal processes •  “chroot on steroids”
  • 11. Why Containers? •  Speed: Boots in seconds •  Footprint: 100-1000 containers on one machine. Small disk requirements
  • 13. Control Groups & Namespaces Linux kernel feature to limit, account and isolate resource usage, such as: – CPU – Memory – Disk I/O
  • 14. AUFS   •  File system that implements union mount.       •  Supports Copy On Write (COW):       # mount –t aufs –o br=/files1:/files2 none /files       # mount –t aufs –o br=/tmp=rw:/bin=ro none /files    
  • 16. Requirements •  Linux Kernel 3.8 or above •  AUFS •  LXC •  64-bit
  • 17. Installations •  Ubuntu Linux •  Binaries •  Using Vagrant More on: http://docs.docker.io/en/latest/installation
  • 18. Installation: Ubuntu Linux •  AUFS support $> sudo apt-get update $> sudo apt-get intall linux-image-extra-`uname –r` •  Add Docker repository $> sudo sh –c “curl https://get.docker.io/gpg | apt-key add -” $> sudo sh –c “echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list” •  Install $> sudo apt-get update $> sudo apt-get install lxc-docker
  • 19. Installation: Binaries •  Get the docker binary $> wget –output-document=docker https://get.docker.io/builds/ Linux/x86_64/docker-latest $> chmod +x docker •  Run the docker daemon $> sudo ./docker –d & •  Use your own system startup script  
  • 20. Installation: Vagrant •  Clone the Docker repository $> git clone https://github.com/dotcloud/docker.git •  Startup the vagrant image $> vagrant up   •  SSH into the image $> vagrant ssh •  Docker client works on Mac
  • 22. Classic: hello world •  Get one base image (ubuntu, centos, busybox,…) $> docker pull ubuntu •  List images on your system $> docker images     •  Print hello world $> docker run ubuntu:12.10 echo “hello world”  
  • 23. Detached mode •  Run  in  Docker  using  the  detach  flag  (-­‐d)   $> docker run –d ubuntu sh –c “while true; do echo hello world; sleep 1; done” •  Get  container’s  id   $> docker ps •  A:ach  to  the  container   $> docker attach <container_id>   •  Stop/Start/Restart  the  container   $> docker stop <container_id>  
  • 24. Containers vs Images •  Remove a file from an image $> docker run busybox rm /etc/passwd •  The file is still there ?? $> docker run busybox cat /etc/passwd •  Commit the newly created to an image $> docker ps –n=2 #get the container’s id $> docker commit <id> vieux/broken-busybox   •  The file is gone $> docker run vieux/broken-busybox cat /etc/passwd
  • 25. Public Index & Network •  Pull an apache image from the public index $> docker search apache $> docker pull creack/apache2 •  Run the image and check the ports $> docker run –d creack/apache2 $> docker ps •  Expose public ports $> docker run –d –p 8888:80 –p 4444:443 creack/apache2 $> docker ps  
  • 26. Creating your 1st app: the interactive way •  Using docker in interactive mode $> docker run –i –t ubuntu bash root@82c63ee50c3d:/# root@82c63ee50c3d:/# apt-get update […] root@82c63ee50c3d:/# apt-get install memcached […] root@82c63ee50c3d:/# exit •  Commit the image $> docker commit `docker ps –q –l` vieux/memcached •  Start the image $> docker run –d –p 11211 –u daemon vieux/memcached memcached
  • 27. Creating your 1st app: the boring way •  Multiple run / commit $> docker run ubuntu apt-get update $> $ID=(docker commit `docker ps –q –l`) $> docker run $ID apt-get install memcached $> docker commit `docker ps –q –l vieux/memcached •  Define default configuration at commit $> docker commit –run=‘{“Entrypoint”: [“memcached”]}’ […] •  Start the image $> docker run –d –p 11211 –u daemon vieux/memcached
  • 28. Creating your 1st app: the scripted way •  Write a Dockerfile # Memcached FROM ubuntu MAINTAINER Victor Vieux <victor@dotcloud.com> RUN apt-get update RUN apt-get install –y memcached ENTRYPOINT [“memcached”] USER daemon EXPOSE 11211 •  Buid the image $> docker build –t=vieux/memcached . •  Start the image $> docker run –d vieux/memcached memcached
  • 29. Volumes and bind mounts •  Put your persistent data in a volume $> $ID=(docker run –d –v /var/lib/mysql vieux/mysql) •  So you can re use it in another container $> docker run –d –volumes-from=$ID vieux/mysql   •  Bind mounts $> docker run –d –v /home/vv:/home <image> •  Supports read only / read write $> docker run –d –v host/path:container/path:rw <image>
  • 30. Other commands •  docker cp #copy a file from container to host •  docker diff #print container changes •  docker top #display running processes inside a container •  docker rm/rmi #delete container/image •  docker wait #wait until container stop and print exit code More on: http://docs.docker.io/en/latest/commandline/cli
  • 32. Local development •  App running in prod http://ks3100989.kimsufi.com:8080/ •  Build local  $> docker build –t=gcm . •  Test local $> docker run –p 49200:8080 gcm  http://localhost:49200 •  Change some files •  Rebuild & test $> docker build –t=gcm . $> docker run –p 49200:8080 gcm
  • 33. Push to prod •  Tag image in order to push it $> docker tag gcm ks3100989.kimsufi.com:5000/gcm •  Push image to local registry $> docker push ks3100989.kimsufi.com:5000/gcm •  On production server, download image $> docker pull ks3100989.kimsufi.com:5000/gcm •  Restart the container $> docker stop <container_id> $> docker run –d –p 8080:8080 <image>