SlideShare uma empresa Scribd logo
1 de 77
Baixar para ler offline
Docker
October 2014—Docker 1.2
@jpetazzo
● Wrote dotCloud PAAS deployment tools
– EC2, LXC, Puppet, Python, Shell, ØMQ...
● Docker contributor
– Security, Networking...
● Runs all kinds of crazy things in Docker
– Docker-in-Docker, VPN-in-Docker,
KVM-in-Docker, Xorg-in-Docker...
Let's start with
Questions
Raise your hand if you have ...
● Tried Docker (online tutorial)
Raise your hand if you have ...
● Tried Docker (online tutorial)
● Tried the real Docker (e.g. deployed remote VM)
Raise your hand if you have ...
● Tried Docker (online tutorial)
● Tried the real Docker (e.g. deployed remote VM)
● Installed Docker locally (e.g. with boot2docker)
Raise your hand if you have ...
● Tried Docker (online tutorial)
● Tried the real Docker (e.g. deployed remote VM)
● Installed Docker locally (e.g. with boot2docker)
● Written a Dockerfile (and built it!)
Raise your hand if you have ...
● Tried Docker (online tutorial)
● Tried the real Docker (e.g. deployed remote VM)
● Installed Docker locally (e.g. with boot2docker)
● Written a Dockerfile (and built it!)
● An image on Docker Hub (pushed or autobuilt)
Raise your hand if you have ...
● Tried Docker (online tutorial)
● Tried the real Docker (e.g. deployed remote VM)
● Installed Docker locally (e.g. with boot2docker)
● Written a Dockerfile (and built it!)
● An image on Docker Hub (pushed or autobuilt)
● Deployed Docker images for dev/QA/test/prod...
Agenda
● What is Docker and Why it matters
● What are containers
● The Docker ecosystem (Engine, Hub, etc.)
● Deployment options and first steps
● What's next?
What
is Docker
Why
it matters
Deploy everything
● Webapps
● Backends
● SQL, NoSQL
● Big data
● Message queues
● … and more
Deploy almost everywhere
● Linux servers
● VMs or bare metal
● Any distro
● Kernel 3.8+ (or RHEL 2.6.32)
Currently: focus on x86_64.
(But people reported success on arm.)
Deploy reliably & consistently
Deploy reliably & consistently
● If it works locally, it will work on the server
● With exactly the same behavior
● Regardless of versions
● Regardless of distros
● Regardless of dependencies
Deploy efficiently
● Containers are lightweight
– Typical laptop runs 10-100 containers easily
– Typical server can run 100-1000 containers
● Containers can run at native speeds
– Lies, damn lies, and other benchmarks:
http://qiita.com/syoyo/items/bea48de8d7c6d8c73435
http://www.slideshare.net/BodenRussell/kvm-and-docker-lxc-benchmarking-with-openstack
Infiniband throughput and latency:
no difference at all
Booting 15 OpenStack VMs:
KVM vs Docker
Memory speed:
Bare Metal vs Docker vs KVM
OK, but
what is
Docker?
Docker Engine
+ Docker Hub
= Docker Platform
The Docker
Engine runs
containers.
OK, but
what is a
container?
High level approach:
it's a lightweight VM
● Own process space
● Own network interface
● Can run stuff as root
● Can have its own /sbin/init
(different from the host)
« Machine Container »
Low level approach:
it's chroot on steroids
● Can also not have its own /sbin/init
● Container = isolated process(es)
● Share kernel with host
● No device emulation (neither HVM nor PV)
« Application Container »
Stop.
Demo time.
Alright, I get this.
Containers = nimble Vms.
Let's just tell the CFO,
and get back to work!
What happens when
something becomes
10-100x cheaper?
Random example:
testing
● Project X has 100 unit tests
● Each test needs a pristine SQL database
Random example:
testing
● Project X has 100 unit tests
● Each test needs a pristine SQL database
● Plan A: spin up 1 database, clean after each use
– If we don't clean correctly, random tests will fail
– Cleaning correctly can be expensive (e.g. reload DB)
Random example:
testing
● Project X has 100 unit tests
● Each test needs a pristine SQL database
● Plan B: spin up 100 databases
– … in parallel: needs too much resources
– … one after the other: takes too long
Random example:
testing
● Project X has 100 unit tests
● Each test needs a pristine SQL database
● Plan C: spin up 100 databases in containers
– fast, efficient (no overhead, copy-on-write)
– easy to implement without virtualization black belt
Containers
make testing
(and many other things)
way easier
The container metaphor
Problem: shipping goods
? ? ? ? ? ?
? ? ? ? ? ?
? ? ? ? ? ?
? ? ? ? ? ?
? ? ? ? ? ?
? ? ? ? ? ?
Solution:
the intermodal shipping container
Solved!
Problem: shipping code
? ? ? ? ? ?
? ? ? ? ? ?
? ? ? ? ? ?
? ? ? ? ? ?
? ? ? ? ? ?
? ? ? ? ? ?
Solution:
the Linux container
Solved!
Separation of concerns:
Dave the Developer
● Inside my container:
– my code
– my libraries
– my package manager
– my app
– my data
Separation of concerns:
Oscar the Ops guy
● Outside the container:
– logging
– remote access
– network configuration
– monitoring
Docker's
Entourage
Docker: the cast
● Docker Engine
● Docker Hub
● Docker, the community
● Docker Inc, the company
Docker Engine
● Open Source engine to commoditize LXC
● Uses copy-on-write for quick provisioning
● Written in Go, runs as a daemon, comes with a CLI
● Everything exposed through a REST API
● Allows to build images in standard, reproducible way
● Allows to share images through registries
● Defines standard format for containers
(stack of layers; 1 layer = tarball+metadata)
… Open Source?
● Nothing up the sleeve, everything on the table
– Public GitHub repository: https://github.com/docker/docker
– Bug reports: GitHub issue tracker
– Mailing lists: docker-user, docker-dev (Google groups)
– IRC channels: #docker, #docker-dev (Freenode)
– New features: GitHub pull requests (see CONTRIBUTING.md)
– Docker Governance Advisory Board (elected by contributors)
Docker Hub
Collection of services to make Docker more useful.
● Public registry
(push/pull your images for free)
● Private registry
(push/pull secret images for $)
● Automated builds
(link github/bitbucket repo; trigger build on commit)
● More to come!
Docker, the community
● >600 contributors
● ~20 core maintainers
● >30,000 Dockerized projects on GitHub
● >40,000 repositories on Docker Hub
● >250 meetups in >90 cities in >30 countries
● >1,500,000 downloads of boot2docker
Docker Inc, the company
● Headcount: ~60
● Led by Open Source veteran Ben Golub
(GlusterFS)
● Revenue:
– t-shirts and stickers featuring the cool blue whale
– SAAS delivered through Docker Hub
– Support & Training
Using
Docker
One-time setup
● On your dev env (Linux, OS X, Windows)
– boot2docker (25 MB VM image)
– Natively (if you run Linux)
● On your servers (Linux)
– Packages (Ubuntu, Debian, Fedora, Gentoo, Arch...)
– Single binary install (Golang FTW!)
– Easy provisioning on Azure, Rackspace, Digital Ocean...
– Special distros: CoreOS, Project Atomic
Authoring images
with a Dockerfile
FROM ubuntu:14.04
RUN apt-get update
RUN apt-get install -y nginx
RUN echo 'Hi, I am in your container!' 
>/usr/share/nginx/html/index.html
CMD nginx -g "daemon off;"
EXPOSE 80
docker build -t jpetazzo/staticweb .
docker run -P jpetazzo/staticweb
FROM ubuntu:12.04
RUN apt-get -y update
RUN apt-get install -y g++
RUN apt-get install -y erlang-dev erlang-base-hipe ...
RUN apt-get install -y libmozjs185-dev libicu-dev libtool ...
RUN apt-get install -y make wget
RUN wget http://.../apache-couchdb-1.3.1.tar.gz 
| tar -C /tmp -zxf-
RUN cd /tmp/apache-couchdb-* && ./configure && make install
RUN printf "[httpd]nport = 8101nbind_address = 0.0.0.0" 
> /usr/local/etc/couchdb/local.d/docker.ini
EXPOSE 8101
CMD ["/usr/local/bin/couchdb"]
docker build -t jpetazzo/couchdb .
FROM debian:jessie
RUN apt-get -y update
RUN apt-get install -y python-pip
RUN mkdir /src
WORKDIR /src
ADD requirements.txt /src
RUN pip install -r requirements.txt
ADD . /src
RUN python setup.py install
Do you even
Chef?
Puppet?
Ansible?
Salt?
Summary
With Docker, I can:
● put my software in containers
● run those containers anywhere
● write recipes to automatically build containers
Advanced concepts
● naming
– give a unique name to your containers
● links
– connect containers together
● volumes
– separate code and data
– share data between containers
Let's
speak
volumes
What is a volume?
● Directory in a container
● Bypassing the copy-on-write system
● Mapped to normal directory on the host
● Zero I/O overhead (implemented as bind-mount)
● Can be shared by multiple containers
What is a volume for?
● Fast I/O path with zero overhead
(kept out of copy-on-write)
● Use specific device in container
(e.g. that 24xSSD RAID10 for PostgreSQL WAL)
● Share data between containers
(e.g. /var/log, /var/lib/mysql, ...)
Read more about volumes
● Docker Docs:
https://docs.docker.com/userguide/dockervolumes/
● Additional insights:
http://blog.docker.com/2014/06/why-you-dont-need-to-run-sshd-in-docker/
Docker
Futures
Non-contractual roadmap
● Provenance, signature (signed images)
● On-prem Docker Hub
● Orchestration
● More execution backends (e.g. OpenVZ)
● ______________ (your contributed feature here)
Recent features: 0.10
● TLS support for API access
● Configurable DNS search
● BTRFS is no longer experimental
● Integration with systemd cgroups
● Use proxy environment variables (for registry)
Recent features: 0.11
● SELinux integration
(works better with CentOS)
● DNS integration for links
(access linked containers by hostname)
● « docker run --net »
– use host networking for high speed
– share network of another container
Recent features: 0.12
● docker pause/unpause
● more importantly: 1.0 release candidate :-)
Docker 1.1
● .dockerignore
(don't upload your .git anymore!)
● docker logs --tail
– further logging improvements on the way
(truncate)
Docker 1.2
● New cool options for docker run
--restart=always/no/on-failure
--cap-add=NETADMIN
--cap-drop=CHOWN
--device=/dev/kvm:/dev/kvm
Coming soon
(maybe)
● logging improvements
● device mapper tuning
● image squashing
● ARM support
● use secrets in builds
● volume management
● hairpin nat
● IPV6 support
● seccomp + native
● user namespaces
Thank you! Questions?
http://docker.com/
@docker
@jpetazzo

Mais conteúdo relacionado

Mais procurados

Virtualization which isn't: LXC (Linux Containers)
Virtualization which isn't: LXC (Linux Containers)Virtualization which isn't: LXC (Linux Containers)
Virtualization which isn't: LXC (Linux Containers)
Dobrica Pavlinušić
 
Scale11x lxc talk
Scale11x lxc talkScale11x lxc talk
Scale11x lxc talk
dotCloud
 
Containers are the future of the Cloud
Containers are the future of the CloudContainers are the future of the Cloud
Containers are the future of the Cloud
Pavel Odintsov
 

Mais procurados (20)

Union FileSystem - A Building Blocks Of a Container
Union FileSystem - A Building Blocks Of a ContainerUnion FileSystem - A Building Blocks Of a Container
Union FileSystem - A Building Blocks Of a Container
 
LXC, Docker, security: is it safe to run applications in Linux Containers?
LXC, Docker, security: is it safe to run applications in Linux Containers?LXC, Docker, security: is it safe to run applications in Linux Containers?
LXC, Docker, security: is it safe to run applications in Linux Containers?
 
Namespaces and cgroups - the basis of Linux containers
Namespaces and cgroups - the basis of Linux containersNamespaces and cgroups - the basis of Linux containers
Namespaces and cgroups - the basis of Linux containers
 
Linux containers – next gen virtualization for cloud (atl summit) ar4 3 - copy
Linux containers – next gen virtualization for cloud (atl summit) ar4 3 - copyLinux containers – next gen virtualization for cloud (atl summit) ar4 3 - copy
Linux containers – next gen virtualization for cloud (atl summit) ar4 3 - copy
 
Seven problems of Linux Containers
Seven problems of Linux ContainersSeven problems of Linux Containers
Seven problems of Linux Containers
 
Containerization is more than the new Virtualization: enabling separation of ...
Containerization is more than the new Virtualization: enabling separation of ...Containerization is more than the new Virtualization: enabling separation of ...
Containerization is more than the new Virtualization: enabling separation of ...
 
Linux cgroups and namespaces
Linux cgroups and namespacesLinux cgroups and namespaces
Linux cgroups and namespaces
 
Container Torture: Run any binary, in any container
Container Torture: Run any binary, in any containerContainer Torture: Run any binary, in any container
Container Torture: Run any binary, in any container
 
Virtualization which isn't: LXC (Linux Containers)
Virtualization which isn't: LXC (Linux Containers)Virtualization which isn't: LXC (Linux Containers)
Virtualization which isn't: LXC (Linux Containers)
 
Containers and Namespaces in the Linux Kernel
Containers and Namespaces in the Linux KernelContainers and Namespaces in the Linux Kernel
Containers and Namespaces in the Linux Kernel
 
Linux container, namespaces & CGroup.
Linux container, namespaces & CGroup. Linux container, namespaces & CGroup.
Linux container, namespaces & CGroup.
 
Containerization Is More than the New Virtualization
Containerization Is More than the New VirtualizationContainerization Is More than the New Virtualization
Containerization Is More than the New Virtualization
 
Lxc- Introduction
Lxc- IntroductionLxc- Introduction
Lxc- Introduction
 
Linux Containers From Scratch
Linux Containers From ScratchLinux Containers From Scratch
Linux Containers From Scratch
 
Scale11x lxc talk
Scale11x lxc talkScale11x lxc talk
Scale11x lxc talk
 
Linux containers-namespaces(Dec 2014)
Linux containers-namespaces(Dec 2014)Linux containers-namespaces(Dec 2014)
Linux containers-namespaces(Dec 2014)
 
Introduction to Docker (and a bit more) at LSPE meetup Sunnyvale
Introduction to Docker (and a bit more) at LSPE meetup SunnyvaleIntroduction to Docker (and a bit more) at LSPE meetup Sunnyvale
Introduction to Docker (and a bit more) at LSPE meetup Sunnyvale
 
Linux Containers From Scratch: Makfile MicroVPS
Linux Containers From Scratch: Makfile MicroVPSLinux Containers From Scratch: Makfile MicroVPS
Linux Containers From Scratch: Makfile MicroVPS
 
Containers are the future of the Cloud
Containers are the future of the CloudContainers are the future of the Cloud
Containers are the future of the Cloud
 
Introduction to linux containers
Introduction to linux containersIntroduction to linux containers
Introduction to linux containers
 

Destaque

Can you hear me now rev 8 9
Can you hear me now rev 8 9Can you hear me now rev 8 9
Can you hear me now rev 8 9
Gregory Walker
 
Weekly mcx newsletter 23 dec 2013
Weekly mcx newsletter 23 dec 2013Weekly mcx newsletter 23 dec 2013
Weekly mcx newsletter 23 dec 2013
Rakhi Tips Provider
 
โครงร่างโครงงานคอม
โครงร่างโครงงานคอมโครงร่างโครงงานคอม
โครงร่างโครงงานคอม
noeiinoii
 
Nuovi arrivi in biblioteca6
Nuovi arrivi in biblioteca6Nuovi arrivi in biblioteca6
Nuovi arrivi in biblioteca6
Federica Pucci
 
New microsoft office word document
New microsoft office word documentNew microsoft office word document
New microsoft office word document
Fajar Pambudi
 
Nagios pawan kumar- stpl 30042012
Nagios pawan kumar- stpl 30042012Nagios pawan kumar- stpl 30042012
Nagios pawan kumar- stpl 30042012
Pawan Kumar
 
Weekly mcx newsletter 02 nov 2013
Weekly mcx newsletter 02 nov 2013Weekly mcx newsletter 02 nov 2013
Weekly mcx newsletter 02 nov 2013
Rakhi Tips Provider
 

Destaque (18)

Can you hear me now rev 8 9
Can you hear me now rev 8 9Can you hear me now rev 8 9
Can you hear me now rev 8 9
 
Weekly mcx newsletter 23 dec 2013
Weekly mcx newsletter 23 dec 2013Weekly mcx newsletter 23 dec 2013
Weekly mcx newsletter 23 dec 2013
 
MCX Commodity Market Newsletter 12-November
MCX Commodity Market Newsletter 12-NovemberMCX Commodity Market Newsletter 12-November
MCX Commodity Market Newsletter 12-November
 
โครงร่างโครงงานคอม
โครงร่างโครงงานคอมโครงร่างโครงงานคอม
โครงร่างโครงงานคอม
 
Waste Regulation in India: An Overview
Waste Regulation in India: An OverviewWaste Regulation in India: An Overview
Waste Regulation in India: An Overview
 
Nuovi arrivi in biblioteca6
Nuovi arrivi in biblioteca6Nuovi arrivi in biblioteca6
Nuovi arrivi in biblioteca6
 
Grynberg pulls ahead in case against kenny anthony and the stlucia labour par...
Grynberg pulls ahead in case against kenny anthony and the stlucia labour par...Grynberg pulls ahead in case against kenny anthony and the stlucia labour par...
Grynberg pulls ahead in case against kenny anthony and the stlucia labour par...
 
Daily Equity Market Newsletter 1-October
Daily Equity Market Newsletter 1-OctoberDaily Equity Market Newsletter 1-October
Daily Equity Market Newsletter 1-October
 
SPEECH BY DR GALE T C RIGOBERT AT THE CARIBBEAN WOMEN OF POLITICAL DISTINCTION
SPEECH BY DR GALE T C RIGOBERT AT THE CARIBBEAN WOMEN OF POLITICAL DISTINCTIONSPEECH BY DR GALE T C RIGOBERT AT THE CARIBBEAN WOMEN OF POLITICAL DISTINCTION
SPEECH BY DR GALE T C RIGOBERT AT THE CARIBBEAN WOMEN OF POLITICAL DISTINCTION
 
New microsoft office word document
New microsoft office word documentNew microsoft office word document
New microsoft office word document
 
Weekly MCX newsletter 25-November
Weekly MCX newsletter 25-NovemberWeekly MCX newsletter 25-November
Weekly MCX newsletter 25-November
 
Elephant Water
Elephant WaterElephant Water
Elephant Water
 
Nagios pawan kumar- stpl 30042012
Nagios pawan kumar- stpl 30042012Nagios pawan kumar- stpl 30042012
Nagios pawan kumar- stpl 30042012
 
Uptown Ritz Penthouse Floor Plan
Uptown Ritz Penthouse Floor PlanUptown Ritz Penthouse Floor Plan
Uptown Ritz Penthouse Floor Plan
 
Weekly mcx newsletter 02 nov 2013
Weekly mcx newsletter 02 nov 2013Weekly mcx newsletter 02 nov 2013
Weekly mcx newsletter 02 nov 2013
 
monitoring linux system
monitoring linux system monitoring linux system
monitoring linux system
 
Virtual reality
Virtual realityVirtual reality
Virtual reality
 
Daily agri news letter 26 july 2013
Daily agri news letter 26 july 2013Daily agri news letter 26 july 2013
Daily agri news letter 26 july 2013
 

Semelhante a Introduction to Docker at Glidewell Laboratories in Orange County

LXC Docker and the Future of Software Delivery
LXC Docker and the Future of Software DeliveryLXC Docker and the Future of Software Delivery
LXC Docker and the Future of Software Delivery
Docker, Inc.
 
A Gentle Introduction to Docker and Containers
A Gentle Introduction to Docker and ContainersA Gentle Introduction to Docker and Containers
A Gentle Introduction to Docker and Containers
Docker, Inc.
 

Semelhante a Introduction to Docker at Glidewell Laboratories in Orange County (20)

Introduction to Docker at the Azure Meet-up in New York
Introduction to Docker at the Azure Meet-up in New YorkIntroduction to Docker at the Azure Meet-up in New York
Introduction to Docker at the Azure Meet-up in New York
 
Docker 1 0 1 0 1: a Docker introduction, actualized for the stable release of...
Docker 1 0 1 0 1: a Docker introduction, actualized for the stable release of...Docker 1 0 1 0 1: a Docker introduction, actualized for the stable release of...
Docker 1 0 1 0 1: a Docker introduction, actualized for the stable release of...
 
Workshop : 45 minutes pour comprendre Docker avec Jérôme Petazzoni
Workshop : 45 minutes pour comprendre Docker avec Jérôme PetazzoniWorkshop : 45 minutes pour comprendre Docker avec Jérôme Petazzoni
Workshop : 45 minutes pour comprendre Docker avec Jérôme Petazzoni
 
Introduction to Docker, December 2014 "Tour de France" Edition
Introduction to Docker, December 2014 "Tour de France" EditionIntroduction to Docker, December 2014 "Tour de France" Edition
Introduction to Docker, December 2014 "Tour de France" Edition
 
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special EditionIntroduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition
 
LXC, Docker, and the future of software delivery | LinuxCon 2013
LXC, Docker, and the future of software delivery | LinuxCon 2013LXC, Docker, and the future of software delivery | LinuxCon 2013
LXC, Docker, and the future of software delivery | LinuxCon 2013
 
LXC Docker and the Future of Software Delivery
LXC Docker and the Future of Software DeliveryLXC Docker and the Future of Software Delivery
LXC Docker and the Future of Software Delivery
 
Docker 0.11 at MaxCDN meetup in Los Angeles
Docker 0.11 at MaxCDN meetup in Los AngelesDocker 0.11 at MaxCDN meetup in Los Angeles
Docker 0.11 at MaxCDN meetup in Los Angeles
 
A Gentle Introduction to Docker and Containers
A Gentle Introduction to Docker and ContainersA Gentle Introduction to Docker and Containers
A Gentle Introduction to Docker and Containers
 
Containers: from development to production at DevNation 2015
Containers: from development to production at DevNation 2015Containers: from development to production at DevNation 2015
Containers: from development to production at DevNation 2015
 
Docker presentation
Docker presentationDocker presentation
Docker presentation
 
Virtual Machines and Docker
Virtual Machines and DockerVirtual Machines and Docker
Virtual Machines and Docker
 
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 introduction
Docker introductionDocker introduction
Docker introduction
 
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
 
A Gentle Introduction To Docker And All Things Containers
A Gentle Introduction To Docker And All Things ContainersA Gentle Introduction To Docker And All Things Containers
A Gentle Introduction To Docker And All Things Containers
 
Docker+java
Docker+javaDocker+java
Docker+java
 
Docker 2014
Docker 2014Docker 2014
Docker 2014
 
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
 
Powercoders · Docker · Fall 2021.pptx
Powercoders · Docker · Fall 2021.pptxPowercoders · Docker · Fall 2021.pptx
Powercoders · Docker · Fall 2021.pptx
 

Mais de Jérôme Petazzoni

Microservices. Microservices everywhere! (At OSCON 2015)
Microservices. Microservices everywhere! (At OSCON 2015)Microservices. Microservices everywhere! (At OSCON 2015)
Microservices. Microservices everywhere! (At OSCON 2015)
Jérôme Petazzoni
 

Mais de Jérôme Petazzoni (20)

Use the Source or Join the Dark Side: differences between Docker Community an...
Use the Source or Join the Dark Side: differences between Docker Community an...Use the Source or Join the Dark Side: differences between Docker Community an...
Use the Source or Join the Dark Side: differences between Docker Community an...
 
Orchestration for the rest of us
Orchestration for the rest of usOrchestration for the rest of us
Orchestration for the rest of us
 
Docker : quels enjeux pour le stockage et réseau ? Paris Open Source Summit ...
Docker : quels enjeux pour le stockage et réseau ? Paris Open Source Summit ...Docker : quels enjeux pour le stockage et réseau ? Paris Open Source Summit ...
Docker : quels enjeux pour le stockage et réseau ? Paris Open Source Summit ...
 
Making DevOps Secure with Docker on Solaris (Oracle Open World, with Jesse Bu...
Making DevOps Secure with Docker on Solaris (Oracle Open World, with Jesse Bu...Making DevOps Secure with Docker on Solaris (Oracle Open World, with Jesse Bu...
Making DevOps Secure with Docker on Solaris (Oracle Open World, with Jesse Bu...
 
Containers, docker, and security: state of the union (Bay Area Infracoders Me...
Containers, docker, and security: state of the union (Bay Area Infracoders Me...Containers, docker, and security: state of the union (Bay Area Infracoders Me...
Containers, docker, and security: state of the union (Bay Area Infracoders Me...
 
From development environments to production deployments with Docker, Compose,...
From development environments to production deployments with Docker, Compose,...From development environments to production deployments with Docker, Compose,...
From development environments to production deployments with Docker, Compose,...
 
How to contribute to large open source projects like Docker (LinuxCon 2015)
How to contribute to large open source projects like Docker (LinuxCon 2015)How to contribute to large open source projects like Docker (LinuxCon 2015)
How to contribute to large open source projects like Docker (LinuxCon 2015)
 
Containers, Docker, and Security: State Of The Union (LinuxCon and ContainerC...
Containers, Docker, and Security: State Of The Union (LinuxCon and ContainerC...Containers, Docker, and Security: State Of The Union (LinuxCon and ContainerC...
Containers, Docker, and Security: State Of The Union (LinuxCon and ContainerC...
 
Microservices. Microservices everywhere! (At OSCON 2015)
Microservices. Microservices everywhere! (At OSCON 2015)Microservices. Microservices everywhere! (At OSCON 2015)
Microservices. Microservices everywhere! (At OSCON 2015)
 
Deploy microservices in containers with Docker and friends - KCDC2015
Deploy microservices in containers with Docker and friends - KCDC2015Deploy microservices in containers with Docker and friends - KCDC2015
Deploy microservices in containers with Docker and friends - KCDC2015
 
Immutable infrastructure with Docker and containers (GlueCon 2015)
Immutable infrastructure with Docker and containers (GlueCon 2015)Immutable infrastructure with Docker and containers (GlueCon 2015)
Immutable infrastructure with Docker and containers (GlueCon 2015)
 
The Docker ecosystem and the future of application deployment
The Docker ecosystem and the future of application deploymentThe Docker ecosystem and the future of application deployment
The Docker ecosystem and the future of application deployment
 
Docker: automation for the rest of us
Docker: automation for the rest of usDocker: automation for the rest of us
Docker: automation for the rest of us
 
Docker Non Technical Presentation
Docker Non Technical PresentationDocker Non Technical Presentation
Docker Non Technical Presentation
 
Containers, Docker, and Microservices: the Terrific Trio
Containers, Docker, and Microservices: the Terrific TrioContainers, Docker, and Microservices: the Terrific Trio
Containers, Docker, and Microservices: the Terrific Trio
 
Pipework: Software-Defined Network for Containers and Docker
Pipework: Software-Defined Network for Containers and DockerPipework: Software-Defined Network for Containers and Docker
Pipework: Software-Defined Network for Containers and Docker
 
Docker Tips And Tricks at the Docker Beijing Meetup
Docker Tips And Tricks at the Docker Beijing MeetupDocker Tips And Tricks at the Docker Beijing Meetup
Docker Tips And Tricks at the Docker Beijing Meetup
 
Docker en Production (Docker Paris)
Docker en Production (Docker Paris)Docker en Production (Docker Paris)
Docker en Production (Docker Paris)
 
Killer Bugs From Outer Space
Killer Bugs From Outer SpaceKiller Bugs From Outer Space
Killer Bugs From Outer Space
 
Docker, Linux Containers (LXC), and security
Docker, Linux Containers (LXC), and securityDocker, Linux Containers (LXC), and security
Docker, Linux Containers (LXC), and security
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
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
 
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
 
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...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
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
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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
 

Introduction to Docker at Glidewell Laboratories in Orange County

  • 1.
  • 3. @jpetazzo ● Wrote dotCloud PAAS deployment tools – EC2, LXC, Puppet, Python, Shell, ØMQ... ● Docker contributor – Security, Networking... ● Runs all kinds of crazy things in Docker – Docker-in-Docker, VPN-in-Docker, KVM-in-Docker, Xorg-in-Docker...
  • 5. Raise your hand if you have ... ● Tried Docker (online tutorial)
  • 6. Raise your hand if you have ... ● Tried Docker (online tutorial) ● Tried the real Docker (e.g. deployed remote VM)
  • 7. Raise your hand if you have ... ● Tried Docker (online tutorial) ● Tried the real Docker (e.g. deployed remote VM) ● Installed Docker locally (e.g. with boot2docker)
  • 8. Raise your hand if you have ... ● Tried Docker (online tutorial) ● Tried the real Docker (e.g. deployed remote VM) ● Installed Docker locally (e.g. with boot2docker) ● Written a Dockerfile (and built it!)
  • 9. Raise your hand if you have ... ● Tried Docker (online tutorial) ● Tried the real Docker (e.g. deployed remote VM) ● Installed Docker locally (e.g. with boot2docker) ● Written a Dockerfile (and built it!) ● An image on Docker Hub (pushed or autobuilt)
  • 10. Raise your hand if you have ... ● Tried Docker (online tutorial) ● Tried the real Docker (e.g. deployed remote VM) ● Installed Docker locally (e.g. with boot2docker) ● Written a Dockerfile (and built it!) ● An image on Docker Hub (pushed or autobuilt) ● Deployed Docker images for dev/QA/test/prod...
  • 11. Agenda ● What is Docker and Why it matters ● What are containers ● The Docker ecosystem (Engine, Hub, etc.) ● Deployment options and first steps ● What's next?
  • 13. Deploy everything ● Webapps ● Backends ● SQL, NoSQL ● Big data ● Message queues ● … and more
  • 14. Deploy almost everywhere ● Linux servers ● VMs or bare metal ● Any distro ● Kernel 3.8+ (or RHEL 2.6.32) Currently: focus on x86_64. (But people reported success on arm.)
  • 15. Deploy reliably & consistently
  • 16.
  • 17. Deploy reliably & consistently ● If it works locally, it will work on the server ● With exactly the same behavior ● Regardless of versions ● Regardless of distros ● Regardless of dependencies
  • 18. Deploy efficiently ● Containers are lightweight – Typical laptop runs 10-100 containers easily – Typical server can run 100-1000 containers ● Containers can run at native speeds – Lies, damn lies, and other benchmarks: http://qiita.com/syoyo/items/bea48de8d7c6d8c73435 http://www.slideshare.net/BodenRussell/kvm-and-docker-lxc-benchmarking-with-openstack
  • 19. Infiniband throughput and latency: no difference at all
  • 20. Booting 15 OpenStack VMs: KVM vs Docker
  • 21. Memory speed: Bare Metal vs Docker vs KVM
  • 23. Docker Engine + Docker Hub = Docker Platform
  • 25. OK, but what is a container?
  • 26. High level approach: it's a lightweight VM ● Own process space ● Own network interface ● Can run stuff as root ● Can have its own /sbin/init (different from the host) « Machine Container »
  • 27. Low level approach: it's chroot on steroids ● Can also not have its own /sbin/init ● Container = isolated process(es) ● Share kernel with host ● No device emulation (neither HVM nor PV) « Application Container »
  • 29.
  • 30. Alright, I get this. Containers = nimble Vms. Let's just tell the CFO, and get back to work!
  • 31.
  • 32. What happens when something becomes 10-100x cheaper?
  • 33. Random example: testing ● Project X has 100 unit tests ● Each test needs a pristine SQL database
  • 34. Random example: testing ● Project X has 100 unit tests ● Each test needs a pristine SQL database ● Plan A: spin up 1 database, clean after each use – If we don't clean correctly, random tests will fail – Cleaning correctly can be expensive (e.g. reload DB)
  • 35. Random example: testing ● Project X has 100 unit tests ● Each test needs a pristine SQL database ● Plan B: spin up 100 databases – … in parallel: needs too much resources – … one after the other: takes too long
  • 36. Random example: testing ● Project X has 100 unit tests ● Each test needs a pristine SQL database ● Plan C: spin up 100 databases in containers – fast, efficient (no overhead, copy-on-write) – easy to implement without virtualization black belt
  • 37. Containers make testing (and many other things) way easier
  • 39. Problem: shipping goods ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
  • 42. Problem: shipping code ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
  • 45. Separation of concerns: Dave the Developer ● Inside my container: – my code – my libraries – my package manager – my app – my data
  • 46. Separation of concerns: Oscar the Ops guy ● Outside the container: – logging – remote access – network configuration – monitoring
  • 48. Docker: the cast ● Docker Engine ● Docker Hub ● Docker, the community ● Docker Inc, the company
  • 49. Docker Engine ● Open Source engine to commoditize LXC ● Uses copy-on-write for quick provisioning ● Written in Go, runs as a daemon, comes with a CLI ● Everything exposed through a REST API ● Allows to build images in standard, reproducible way ● Allows to share images through registries ● Defines standard format for containers (stack of layers; 1 layer = tarball+metadata)
  • 50. … Open Source? ● Nothing up the sleeve, everything on the table – Public GitHub repository: https://github.com/docker/docker – Bug reports: GitHub issue tracker – Mailing lists: docker-user, docker-dev (Google groups) – IRC channels: #docker, #docker-dev (Freenode) – New features: GitHub pull requests (see CONTRIBUTING.md) – Docker Governance Advisory Board (elected by contributors)
  • 51. Docker Hub Collection of services to make Docker more useful. ● Public registry (push/pull your images for free) ● Private registry (push/pull secret images for $) ● Automated builds (link github/bitbucket repo; trigger build on commit) ● More to come!
  • 52. Docker, the community ● >600 contributors ● ~20 core maintainers ● >30,000 Dockerized projects on GitHub ● >40,000 repositories on Docker Hub ● >250 meetups in >90 cities in >30 countries ● >1,500,000 downloads of boot2docker
  • 53. Docker Inc, the company ● Headcount: ~60 ● Led by Open Source veteran Ben Golub (GlusterFS) ● Revenue: – t-shirts and stickers featuring the cool blue whale – SAAS delivered through Docker Hub – Support & Training
  • 55. One-time setup ● On your dev env (Linux, OS X, Windows) – boot2docker (25 MB VM image) – Natively (if you run Linux) ● On your servers (Linux) – Packages (Ubuntu, Debian, Fedora, Gentoo, Arch...) – Single binary install (Golang FTW!) – Easy provisioning on Azure, Rackspace, Digital Ocean... – Special distros: CoreOS, Project Atomic
  • 57. FROM ubuntu:14.04 RUN apt-get update RUN apt-get install -y nginx RUN echo 'Hi, I am in your container!' >/usr/share/nginx/html/index.html CMD nginx -g "daemon off;" EXPOSE 80 docker build -t jpetazzo/staticweb . docker run -P jpetazzo/staticweb
  • 58.
  • 59. FROM ubuntu:12.04 RUN apt-get -y update RUN apt-get install -y g++ RUN apt-get install -y erlang-dev erlang-base-hipe ... RUN apt-get install -y libmozjs185-dev libicu-dev libtool ... RUN apt-get install -y make wget RUN wget http://.../apache-couchdb-1.3.1.tar.gz | tar -C /tmp -zxf- RUN cd /tmp/apache-couchdb-* && ./configure && make install RUN printf "[httpd]nport = 8101nbind_address = 0.0.0.0" > /usr/local/etc/couchdb/local.d/docker.ini EXPOSE 8101 CMD ["/usr/local/bin/couchdb"] docker build -t jpetazzo/couchdb .
  • 60. FROM debian:jessie RUN apt-get -y update RUN apt-get install -y python-pip RUN mkdir /src WORKDIR /src ADD requirements.txt /src RUN pip install -r requirements.txt ADD . /src RUN python setup.py install
  • 62.
  • 63. Summary With Docker, I can: ● put my software in containers ● run those containers anywhere ● write recipes to automatically build containers
  • 64. Advanced concepts ● naming – give a unique name to your containers ● links – connect containers together ● volumes – separate code and data – share data between containers
  • 66. What is a volume? ● Directory in a container ● Bypassing the copy-on-write system ● Mapped to normal directory on the host ● Zero I/O overhead (implemented as bind-mount) ● Can be shared by multiple containers
  • 67. What is a volume for? ● Fast I/O path with zero overhead (kept out of copy-on-write) ● Use specific device in container (e.g. that 24xSSD RAID10 for PostgreSQL WAL) ● Share data between containers (e.g. /var/log, /var/lib/mysql, ...)
  • 68. Read more about volumes ● Docker Docs: https://docs.docker.com/userguide/dockervolumes/ ● Additional insights: http://blog.docker.com/2014/06/why-you-dont-need-to-run-sshd-in-docker/
  • 70. Non-contractual roadmap ● Provenance, signature (signed images) ● On-prem Docker Hub ● Orchestration ● More execution backends (e.g. OpenVZ) ● ______________ (your contributed feature here)
  • 71. Recent features: 0.10 ● TLS support for API access ● Configurable DNS search ● BTRFS is no longer experimental ● Integration with systemd cgroups ● Use proxy environment variables (for registry)
  • 72. Recent features: 0.11 ● SELinux integration (works better with CentOS) ● DNS integration for links (access linked containers by hostname) ● « docker run --net » – use host networking for high speed – share network of another container
  • 73. Recent features: 0.12 ● docker pause/unpause ● more importantly: 1.0 release candidate :-)
  • 74. Docker 1.1 ● .dockerignore (don't upload your .git anymore!) ● docker logs --tail – further logging improvements on the way (truncate)
  • 75. Docker 1.2 ● New cool options for docker run --restart=always/no/on-failure --cap-add=NETADMIN --cap-drop=CHOWN --device=/dev/kvm:/dev/kvm
  • 76. Coming soon (maybe) ● logging improvements ● device mapper tuning ● image squashing ● ARM support ● use secrets in builds ● volume management ● hairpin nat ● IPV6 support ● seccomp + native ● user namespaces