SlideShare a Scribd company logo
1 of 17
WHAT? 
YOU'RE NOT USING 
DOCKER?
Cary Gordon 
The Cherry Hill Company 
Los Angeles, CA 
chillco.com 
info@chillco.com 
310-397-2999
CONTAINERS 
CAN’T LIVE WITHOUT THEM 
What? You're Not Using Docker?
CONTAINERS 
CAN’T LIVE WITHOUT THEM 
(Googled Hideous Dresser) 
What? You're Not Using Docker?
VIRTUALIZATION 
What? You're Not Using Docker?
CONTAINERIZATION 
(MIGHT NOT BE A WORD) 
What? You're Not Using Docker?
CONTAINERS 
• chroot 
Sandboxing (chroot jails) 
• Linux containers (LXC) 
chroot + OS isolation 
• Docker 
LXC + packaging 
What? You're Not Using Docker?
CONTAINERS 
What? You're Not Using Docker? 
Mechani 
sm 
Operating system License 
Availabl 
e 
since/be 
tween 
Features 
File 
system 
isolatio 
n 
Copy on 
Write 
Disk 
quotas 
I/O rate 
limiting 
Memory 
limits 
CPU 
quotas 
Network 
isolatio 
n 
Partition 
checkpo 
inting 
and live 
migratio 
n 
Root 
privileg 
e 
isolatio 
n 
chroot 
most UNIX-like 
operating systems 
varies by 
operating 
system 
1982 Partial No No No No No No No No 
LXC Linux GNU GPLv2 2014 Yes 
Partial. Yes 
withBtrfs. 
Partial. Yes 
withLVM or 
Disk quota. 
Yes Yes Yes Yes No Ye [9 
Docker 
Linux (using LXC), 
Windows/OS X (using 
LXC inside a lightweight 
Linux image) 
Apache 
License 2.0 
2013 Yes Yes Not directly Not directly Yes Yes Yes No No 
Drawn from http://wki.pe/Operating_system%E2%80%93level_virtualization 
Commercial alternative 
Parallels 
Virtuozzo 
Containers 
Linux, Windows Proprietary 2001 Yes Yes Yes Yes Yes Yes Yes Yes Yes
WHAT YOU CAN DO 
• Continuous Integration 
• Continuous Delivery 
• Distributed Applications 
• Easy Application Deployment 
• Platform-as-a-Service (PaaS) 
What? You're Not Using Docker?
DOCKER COMMANDS 
$ docker 
Usage: docker [OPTIONS] COMMAND [arg...] 
-H=[unix:///var/run/docker.sock]: tcp://host:port to bind/connect to or unix://path/to/socket to use 
A self-sufficient runtime for linux containers. 
What? You're Not Using Docker? 
Commands: 
attach Attach to a running container 
build Build an image from a Dockerfile 
commit Create a new image from a container's changes 
cp Copy files/folders from a container's filesystem to the host path 
diff Inspect changes on a container's filesystem 
events Get real time events from the server 
export Stream the contents of a container as a tar archive 
history Show the history of an image 
images List images 
import Create a new filesystem image from the contents of a tarball 
info Display system-wide information 
inspect Return low-level information on a container 
kill Kill a running container 
load Load an image from a tar archive 
login Register or log in to a Docker registry server 
logout Log out from a Docker registry server 
logs Fetch the logs of a container 
port Lookup the public-facing port that is NAT-ed to PRIVATE_PORT 
pause Pause all processes within a container 
ps List containers 
pull Pull an image or a repository from a Docker registry server 
push Push an image or a repository to a Docker registry server 
restart Restart a running container 
rm Remove one or more containers 
rmi Remove one or more images 
run Run a command in a new container 
save Save an image to a tar archive 
search Search for an image on the Docker Hub 
start Start a stopped container 
stop Stop a running container 
tag Tag an image into a repository 
top Lookup the running processes of a container 
unpause Unpause a paused container 
version Show the Docker version information 
wait Block until a container stops, then print its exit code
DOCKER JARGON 
• Docker an open platform for developers and sysadmins to build, ship, and run 
distributed applications anywhere. It uses the same binary for daemons and clients 
• Docker Hub a registry of Docker images 
• Dockerfile A simple script listing the commands to build a Docker image. Invoked with 
What? You're Not Using Docker? 
docker build 
• Daemon options Environment options including networking, storage, and exec 
through the libcontainer execution driver 
• boot2docker A minimal Virtualbox to run docker on OS X
DOCKER HUB 
What? You're Not Using Docker?
DOCKER HUB 
What? You're Not Using Docker?
DOCKER HUB 
What? You're Not Using Docker?
DOCKERFILE 
## 
# Drupal/SSH with Nginx, PHP5 and SQLite 
## 
FROM ubuntu:13.04 
MAINTAINER http://www.github.com/b7alt/ by b7alt 
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list 
RUN apt-get update && apt-get upgrade -y 
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y supervisor openssh-server nginx php5-fpm php5-sqlite php5-gd drush emacs php-apc 
RUN update-rc.d nginx disable 
RUN update-rc.d php5-fpm disable 
RUN update-rc.d supervisor disable 
RUN update-rc.d ssh disable 
What? You're Not Using Docker? 
EXPOSE 22 80 
RUN mkdir -p /var/run/sshd /srv/drupal/www /srv/drupal/config /srv/data /srv/logs /tmp 
ADD site.conf /srv/drupal/config/site.conf 
ADD nginx.conf /nginx.conf 
ADD php-fpm.conf /php-fpm.conf 
ADD supervisord.conf /supervisord.conf 
ADD settings.php.append /settings.php.append 
RUN cd /tmp && drush dl drupal && mv /tmp/drupal*/* /srv/drupal/www/ && rm -rf /tmp/* 
RUN chmod a+w /srv/drupal/www/sites/default && mkdir /srv/drupal/www/sites/default/files 
RUN chown -R www-data:www-data /srv/drupal/www/ 
RUN cp /srv/drupal/www/sites/default/default.settings.php /srv/drupal/www/sites/default/settings.php 
RUN chmod a+w /srv/drupal/www/sites/default/settings.php 
RUN chown www-data:www-data /srv/data 
#RUN chmod a+w /srv/drupal/www/sites/default/files 
RUN cd /srv/drupal/www/ && drush -y site-install standard --account-name=admin --account-pass=test --db-url=sqlite:sites/default/files/.ht.sqlite 
RUN cat /settings.php.append >> /srv/drupal/www/sites/default/settings.php 
RUN cd /srv/drupal/www/ && drush -y dl environment_indicator devel 
RUN cd /srv/drupal/www/ && drush -y en environment_indicator devel 
RUN ls -al /srv/drupal/www/sites/default/files 
RUN chown -R www-data:www-data /srv/drupal/www/sites/default/files/.ht.sqlite 
RUN chmod a-w /srv/drupal/www/sites/default/settings.php 
RUN echo "root:root" | chpasswd 
ENTRYPOINT [ "/usr/bin/supervisord", "-n", "-c", "/supervisord.conf", "-e", "trace" ]
DOCKER HUB 
What? You're Not Using Docker?
X 
• https://docker.com/ 
• https://hub.docker.com/ 
• http://www.dockerbook.com/ 
• https://www.docker.com/tryit/ 
• http://learningdocker.com/ 
• http://www.ansible.com/docker 
What? You're Not Using Docker?

More Related Content

What's hot

Docker - The Linux Container
Docker - The Linux ContainerDocker - The Linux Container
Docker - The Linux Container
Balaji Rajan
 

What's hot (20)

Docker Introductory workshop
Docker Introductory workshopDocker Introductory workshop
Docker Introductory workshop
 
Using Docker in the Real World
Using Docker in the Real WorldUsing Docker in the Real World
Using Docker in the Real World
 
dockerizing web application
dockerizing web applicationdockerizing web application
dockerizing web application
 
Shipping Applications to Production in Containers with Docker
Shipping Applications to Production in Containers with DockerShipping Applications to Production in Containers with Docker
Shipping Applications to Production in Containers with Docker
 
Docker by Example - Basics
Docker by Example - Basics Docker by Example - Basics
Docker by Example - Basics
 
Docker-hanoi meetup #1: introduction about Docker
Docker-hanoi meetup #1: introduction about DockerDocker-hanoi meetup #1: introduction about Docker
Docker-hanoi meetup #1: introduction about Docker
 
Running Django on Docker: a workflow and code
Running Django on Docker: a workflow and codeRunning Django on Docker: a workflow and code
Running Django on Docker: a workflow and code
 
Docker and Containers for Development and Deployment — SCALE12X
Docker and Containers for Development and Deployment — SCALE12XDocker and Containers for Development and Deployment — SCALE12X
Docker and Containers for Development and Deployment — SCALE12X
 
Docker 101 @KACST Saudi HPC 2016
Docker 101  @KACST Saudi HPC 2016Docker 101  @KACST Saudi HPC 2016
Docker 101 @KACST Saudi HPC 2016
 
Docker - The Linux Container
Docker - The Linux ContainerDocker - The Linux Container
Docker - The Linux Container
 
Docker module 1
Docker module 1Docker module 1
Docker module 1
 
Docker Distributed application bundle & Stack - Overview
Docker Distributed application bundle & Stack - Overview Docker Distributed application bundle & Stack - Overview
Docker Distributed application bundle & Stack - Overview
 
Docker - introduction
Docker - introductionDocker - introduction
Docker - introduction
 
99cloud Docker Training module 2
99cloud Docker Training module 299cloud Docker Training module 2
99cloud Docker Training module 2
 
Introduction To Docker
Introduction To  DockerIntroduction To  Docker
Introduction To Docker
 
Containers: The What, Why, and How
Containers: The What, Why, and HowContainers: The What, Why, and How
Containers: The What, Why, and How
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to 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
 
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, OrchestrationThe Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
 
Techtalks: taking docker to production
Techtalks: taking docker to productionTechtalks: taking docker to production
Techtalks: taking docker to production
 

Viewers also liked

Docker Internals - Twilio talk November 14th, 2013
Docker Internals - Twilio talk November 14th, 2013Docker Internals - Twilio talk November 14th, 2013
Docker Internals - Twilio talk November 14th, 2013
Guillaume Charmes
 
Hooking Docker With Selenium
Hooking Docker With SeleniumHooking Docker With Selenium
Hooking Docker With Selenium
Sujith Vakathanam
 

Viewers also liked (20)

Using Docker with OpenStack - Hands On!
 Using Docker with OpenStack - Hands On! Using Docker with OpenStack - Hands On!
Using Docker with OpenStack - Hands On!
 
Docker up and running
Docker up and runningDocker up and running
Docker up and running
 
Scaling Next-Generation Internet TV on AWS With Docker, Packer, and Chef
Scaling Next-Generation Internet TV on AWS With Docker, Packer, and ChefScaling Next-Generation Internet TV on AWS With Docker, Packer, and Chef
Scaling Next-Generation Internet TV on AWS With Docker, Packer, and Chef
 
Docker Started
Docker StartedDocker Started
Docker Started
 
Comprehensive Monitoring for Docker
Comprehensive Monitoring for DockerComprehensive Monitoring for Docker
Comprehensive Monitoring for Docker
 
Docker toolbox
Docker toolboxDocker toolbox
Docker toolbox
 
Running High Performance and Fault Tolerant Elasticsearch Clusters on Docker
Running High Performance and Fault Tolerant Elasticsearch Clusters on DockerRunning High Performance and Fault Tolerant Elasticsearch Clusters on Docker
Running High Performance and Fault Tolerant Elasticsearch Clusters on Docker
 
DevOps and Continuous Delivery reference architectures for Docker
DevOps and Continuous Delivery reference architectures for DockerDevOps and Continuous Delivery reference architectures for Docker
DevOps and Continuous Delivery reference architectures for Docker
 
Infrastructure Deployment with Docker & Ansible
Infrastructure Deployment with Docker & AnsibleInfrastructure Deployment with Docker & Ansible
Infrastructure Deployment with Docker & Ansible
 
Why Cloud Computing has to go the FOSS way
Why Cloud Computing has to go the FOSS wayWhy Cloud Computing has to go the FOSS way
Why Cloud Computing has to go the FOSS way
 
Sometimes you feel like a docker... sometimes you don't.
Sometimes you feel like a docker... sometimes you don't.Sometimes you feel like a docker... sometimes you don't.
Sometimes you feel like a docker... sometimes you don't.
 
Evoluation of Linux Container Virtualization
Evoluation of Linux Container VirtualizationEvoluation of Linux Container Virtualization
Evoluation of Linux Container Virtualization
 
Docker use dockerfile
Docker use dockerfileDocker use dockerfile
Docker use dockerfile
 
Introduction to Docker - What is it and how is it compared to VM's
Introduction to Docker - What is it and how is it compared to VM'sIntroduction to Docker - What is it and how is it compared to VM's
Introduction to Docker - What is it and how is it compared to VM's
 
Docker Internals - Twilio talk November 14th, 2013
Docker Internals - Twilio talk November 14th, 2013Docker Internals - Twilio talk November 14th, 2013
Docker Internals - Twilio talk November 14th, 2013
 
Getting Started with Docker
Getting Started with DockerGetting Started with Docker
Getting Started with Docker
 
Geode on Docker
Geode on DockerGeode on Docker
Geode on Docker
 
Hadoop Ecosystem Architecture Overview
Hadoop Ecosystem Architecture Overview Hadoop Ecosystem Architecture Overview
Hadoop Ecosystem Architecture Overview
 
Hooking Docker With Selenium
Hooking Docker With SeleniumHooking Docker With Selenium
Hooking Docker With Selenium
 
Continuous Integration with Docker on AWS
Continuous Integration with Docker on AWSContinuous Integration with Docker on AWS
Continuous Integration with Docker on AWS
 

Similar to Docker

Automate drupal deployments with linux containers, docker and vagrant
Automate drupal deployments with linux containers, docker and vagrant Automate drupal deployments with linux containers, docker and vagrant
Automate drupal deployments with linux containers, docker and vagrant
Ricardo Amaro
 

Similar to Docker (20)

Docker Ecosystem on Azure
Docker Ecosystem on AzureDocker Ecosystem on Azure
Docker Ecosystem on Azure
 
Introduction to Docker - Learning containerization XP conference 2016
Introduction to Docker - Learning containerization  XP conference 2016Introduction to Docker - Learning containerization  XP conference 2016
Introduction to Docker - Learning containerization XP conference 2016
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
codemotion-docker-2014
codemotion-docker-2014codemotion-docker-2014
codemotion-docker-2014
 
From zero to Docker
From zero to DockerFrom zero to Docker
From zero to Docker
 
Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...
Why everyone is excited about Docker (and you should too...) -  Carlo Bonamic...Why everyone is excited about Docker (and you should too...) -  Carlo Bonamic...
Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...
 
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
 
Dockers & kubernetes detailed - Beginners to Geek
Dockers & kubernetes detailed - Beginners to GeekDockers & kubernetes detailed - Beginners to Geek
Dockers & kubernetes detailed - Beginners to Geek
 
Docker and containers - Presentation Slides by Priyadarshini Anand
Docker and containers - Presentation Slides by Priyadarshini AnandDocker and containers - Presentation Slides by Priyadarshini Anand
Docker and containers - Presentation Slides by Priyadarshini Anand
 
Docker engine - Indroduc
Docker engine - IndroducDocker engine - Indroduc
Docker engine - Indroduc
 
Powercoders · Docker · Fall 2021.pptx
Powercoders · Docker · Fall 2021.pptxPowercoders · Docker · Fall 2021.pptx
Powercoders · Docker · Fall 2021.pptx
 
Automate drupal deployments with linux containers, docker and vagrant
Automate drupal deployments with linux containers, docker and vagrant Automate drupal deployments with linux containers, docker and vagrant
Automate drupal deployments with linux containers, docker and vagrant
 
Docker, but what it is?
Docker, but what it is?Docker, but what it is?
Docker, but what it is?
 
Docker, LinuX Container
Docker, LinuX ContainerDocker, LinuX Container
Docker, LinuX Container
 
Learning Docker with Thomas
Learning Docker with ThomasLearning Docker with Thomas
Learning Docker with Thomas
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Talk about Docker
Talk about DockerTalk about Docker
Talk about Docker
 
Docker in a JS Developer’s Life
Docker in a JS Developer’s LifeDocker in a JS Developer’s Life
Docker in a JS Developer’s Life
 
Introducing Docker
Introducing DockerIntroducing Docker
Introducing Docker
 
docker installation and basics
docker installation and basicsdocker installation and basics
docker installation and basics
 

Recently uploaded

The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 

Recently uploaded (20)

The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
 

Docker

  • 1. WHAT? YOU'RE NOT USING DOCKER?
  • 2. Cary Gordon The Cherry Hill Company Los Angeles, CA chillco.com info@chillco.com 310-397-2999
  • 3. CONTAINERS CAN’T LIVE WITHOUT THEM What? You're Not Using Docker?
  • 4. CONTAINERS CAN’T LIVE WITHOUT THEM (Googled Hideous Dresser) What? You're Not Using Docker?
  • 5. VIRTUALIZATION What? You're Not Using Docker?
  • 6. CONTAINERIZATION (MIGHT NOT BE A WORD) What? You're Not Using Docker?
  • 7. CONTAINERS • chroot Sandboxing (chroot jails) • Linux containers (LXC) chroot + OS isolation • Docker LXC + packaging What? You're Not Using Docker?
  • 8. CONTAINERS What? You're Not Using Docker? Mechani sm Operating system License Availabl e since/be tween Features File system isolatio n Copy on Write Disk quotas I/O rate limiting Memory limits CPU quotas Network isolatio n Partition checkpo inting and live migratio n Root privileg e isolatio n chroot most UNIX-like operating systems varies by operating system 1982 Partial No No No No No No No No LXC Linux GNU GPLv2 2014 Yes Partial. Yes withBtrfs. Partial. Yes withLVM or Disk quota. Yes Yes Yes Yes No Ye [9 Docker Linux (using LXC), Windows/OS X (using LXC inside a lightweight Linux image) Apache License 2.0 2013 Yes Yes Not directly Not directly Yes Yes Yes No No Drawn from http://wki.pe/Operating_system%E2%80%93level_virtualization Commercial alternative Parallels Virtuozzo Containers Linux, Windows Proprietary 2001 Yes Yes Yes Yes Yes Yes Yes Yes Yes
  • 9. WHAT YOU CAN DO • Continuous Integration • Continuous Delivery • Distributed Applications • Easy Application Deployment • Platform-as-a-Service (PaaS) What? You're Not Using Docker?
  • 10. DOCKER COMMANDS $ docker Usage: docker [OPTIONS] COMMAND [arg...] -H=[unix:///var/run/docker.sock]: tcp://host:port to bind/connect to or unix://path/to/socket to use A self-sufficient runtime for linux containers. What? You're Not Using Docker? Commands: attach Attach to a running container build Build an image from a Dockerfile commit Create a new image from a container's changes cp Copy files/folders from a container's filesystem to the host path diff Inspect changes on a container's filesystem events Get real time events from the server export Stream the contents of a container as a tar archive history Show the history of an image images List images import Create a new filesystem image from the contents of a tarball info Display system-wide information inspect Return low-level information on a container kill Kill a running container load Load an image from a tar archive login Register or log in to a Docker registry server logout Log out from a Docker registry server logs Fetch the logs of a container port Lookup the public-facing port that is NAT-ed to PRIVATE_PORT pause Pause all processes within a container ps List containers pull Pull an image or a repository from a Docker registry server push Push an image or a repository to a Docker registry server restart Restart a running container rm Remove one or more containers rmi Remove one or more images run Run a command in a new container save Save an image to a tar archive search Search for an image on the Docker Hub start Start a stopped container stop Stop a running container tag Tag an image into a repository top Lookup the running processes of a container unpause Unpause a paused container version Show the Docker version information wait Block until a container stops, then print its exit code
  • 11. DOCKER JARGON • Docker an open platform for developers and sysadmins to build, ship, and run distributed applications anywhere. It uses the same binary for daemons and clients • Docker Hub a registry of Docker images • Dockerfile A simple script listing the commands to build a Docker image. Invoked with What? You're Not Using Docker? docker build • Daemon options Environment options including networking, storage, and exec through the libcontainer execution driver • boot2docker A minimal Virtualbox to run docker on OS X
  • 12. DOCKER HUB What? You're Not Using Docker?
  • 13. DOCKER HUB What? You're Not Using Docker?
  • 14. DOCKER HUB What? You're Not Using Docker?
  • 15. DOCKERFILE ## # Drupal/SSH with Nginx, PHP5 and SQLite ## FROM ubuntu:13.04 MAINTAINER http://www.github.com/b7alt/ by b7alt RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list RUN apt-get update && apt-get upgrade -y RUN DEBIAN_FRONTEND=noninteractive apt-get install -y supervisor openssh-server nginx php5-fpm php5-sqlite php5-gd drush emacs php-apc RUN update-rc.d nginx disable RUN update-rc.d php5-fpm disable RUN update-rc.d supervisor disable RUN update-rc.d ssh disable What? You're Not Using Docker? EXPOSE 22 80 RUN mkdir -p /var/run/sshd /srv/drupal/www /srv/drupal/config /srv/data /srv/logs /tmp ADD site.conf /srv/drupal/config/site.conf ADD nginx.conf /nginx.conf ADD php-fpm.conf /php-fpm.conf ADD supervisord.conf /supervisord.conf ADD settings.php.append /settings.php.append RUN cd /tmp && drush dl drupal && mv /tmp/drupal*/* /srv/drupal/www/ && rm -rf /tmp/* RUN chmod a+w /srv/drupal/www/sites/default && mkdir /srv/drupal/www/sites/default/files RUN chown -R www-data:www-data /srv/drupal/www/ RUN cp /srv/drupal/www/sites/default/default.settings.php /srv/drupal/www/sites/default/settings.php RUN chmod a+w /srv/drupal/www/sites/default/settings.php RUN chown www-data:www-data /srv/data #RUN chmod a+w /srv/drupal/www/sites/default/files RUN cd /srv/drupal/www/ && drush -y site-install standard --account-name=admin --account-pass=test --db-url=sqlite:sites/default/files/.ht.sqlite RUN cat /settings.php.append >> /srv/drupal/www/sites/default/settings.php RUN cd /srv/drupal/www/ && drush -y dl environment_indicator devel RUN cd /srv/drupal/www/ && drush -y en environment_indicator devel RUN ls -al /srv/drupal/www/sites/default/files RUN chown -R www-data:www-data /srv/drupal/www/sites/default/files/.ht.sqlite RUN chmod a-w /srv/drupal/www/sites/default/settings.php RUN echo "root:root" | chpasswd ENTRYPOINT [ "/usr/bin/supervisord", "-n", "-c", "/supervisord.conf", "-e", "trace" ]
  • 16. DOCKER HUB What? You're Not Using Docker?
  • 17. X • https://docker.com/ • https://hub.docker.com/ • http://www.dockerbook.com/ • https://www.docker.com/tryit/ • http://learningdocker.com/ • http://www.ansible.com/docker What? You're Not Using Docker?