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

Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to dockerInstruqt
 
Installing and running Postfix within a docker container from the command line
Installing and running Postfix within a docker container from the command lineInstalling and running Postfix within a docker container from the command line
Installing and running Postfix within a docker container from the command linedotCloud
 
Docker 101: An Introduction
Docker 101: An IntroductionDocker 101: An Introduction
Docker 101: An IntroductionPOSSCON
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes IntroductionPeng Xiao
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to dockerJohn Willis
 
Docker 101 - Getting started
Docker 101 - Getting startedDocker 101 - Getting started
Docker 101 - Getting startedMatheus Marabesi
 
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 Introduction
Docker IntroductionDocker Introduction
Docker IntroductionPeng Xiao
 
1. Docker Introduction.pdf
1. Docker Introduction.pdf1. Docker Introduction.pdf
1. Docker Introduction.pdfAmarGautam15
 
Docker Compose by Aanand Prasad
Docker Compose by Aanand Prasad Docker Compose by Aanand Prasad
Docker Compose by Aanand Prasad Docker, Inc.
 
Containerization and Docker
Containerization and DockerContainerization and Docker
Containerization and DockerMegha Bansal
 
Docker and kubernetes
Docker and kubernetesDocker and kubernetes
Docker and kubernetesDongwon Kim
 
Docker intro
Docker introDocker intro
Docker introOleg Z
 
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
 

Mais procurados (20)

Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Installing and running Postfix within a docker container from the command line
Installing and running Postfix within a docker container from the command lineInstalling and running Postfix within a docker container from the command line
Installing and running Postfix within a docker container from the command line
 
Docker.pptx
Docker.pptxDocker.pptx
Docker.pptx
 
Docker 101: An Introduction
Docker 101: An IntroductionDocker 101: An Introduction
Docker 101: An Introduction
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Docker 101 - Getting started
Docker 101 - Getting startedDocker 101 - Getting started
Docker 101 - Getting started
 
From Zero to Docker
From Zero to DockerFrom Zero to Docker
From Zero to Docker
 
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 Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
1. Docker Introduction.pdf
1. Docker Introduction.pdf1. Docker Introduction.pdf
1. Docker Introduction.pdf
 
Docker Compose by Aanand Prasad
Docker Compose by Aanand Prasad Docker Compose by Aanand Prasad
Docker Compose by Aanand Prasad
 
Intro to docker
Intro to dockerIntro to docker
Intro to docker
 
Containerization and Docker
Containerization and DockerContainerization and Docker
Containerization and Docker
 
Docker and kubernetes
Docker and kubernetesDocker and kubernetes
Docker and kubernetes
 
Docker
DockerDocker
Docker
 
Docker, LinuX Container
Docker, LinuX ContainerDocker, LinuX Container
Docker, LinuX Container
 
What is Docker?
What is Docker?What is Docker?
What is Docker?
 
Docker intro
Docker introDocker intro
Docker intro
 
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...
 

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

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
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
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 

Último (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 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
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 

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>