SlideShare uma empresa Scribd logo
1 de 45
Baixar para ler offline
Introduction to Docker
Contents
• Introduction to Containers
• What is Docker?
• Docker Architecture
• Installing Docker
• Docker Engine
• Docker Images
• Docker File
• Docker Hub
• Docker CLI
• Kubernetes
• Hands On Demo
Containers
• LXC (Linux Containers) is an operating-system-level
virtualization method for running multiple isolated Linux
systems (containers) on a control host using a single Linux
kernel.
• The Linux kernel provides the cgroups functionality that
allows limitation and prioritization of resources (CPU,
memory, block I/O, network, etc.) without the need for
starting any virtual machines, and namespace isolation
functionality that allows complete isolation of an
applications' view of the operating environment, including
process trees, networking, user IDs and mounted file
systems
Why Containers
What is Docker
• Docker is an open-source project that automates the
deployment of applications inside software container
• Docker containers wrap up a piece of software in a
complete file system that contains everything it needs to
run: code, runtime, system tools, system libraries –
anything you can install on a server.
• This guarantees that it will always run the same,
regardless of the environment it is running in.
Static website
Web frontend
User DB
Queue Analytics DB
Background workers
API endpoint
nginx 1.5 + modsecurity + openssl + bootstrap 2
postgresql + pgv8 + v8
hadoop + hive + thrift + OpenJDK
Ruby + Rails + sass + Unicorn
Redis + redis-sentinel
Python 3.0 + celery + pyredis + libcurl + ffmpeg + libopencv + nodejs +
phantomjs
Python 2.7 + Flask + pyredis + celery + psycopg + postgresql-client
Development VM
QA server
Public Cloud
Disaster recovery
Contributor’s laptop
Production Servers
The Challenge
Multiplicityof
Stacks
Multiplicityof
hardware
environments
Production Cluster
Customer Data Center
Doservicesand
appsinteract
appropriately?
CanImigrate
smoothlyand
quickly?
The Matrix From Hell
Static website
Web frontend
Background workers
User DB
Analytics DB
Queue
Development
VM
QA Server
Single Prod
Server
Onsite
Cluster
Public Cloud
Contributor’s
laptop
Customer
Servers
? ? ? ? ? ? ?
? ? ? ? ? ? ?
? ? ? ? ? ? ?
? ? ? ? ? ? ?
? ? ? ? ? ? ?
? ? ? ? ? ? ?
Multiplicityof
Goods
Multipilicityof
methodsfor
transporting/storin
g
DoIworryabout
howgoodsinteract
(e.g.coffeebeans
nexttospices)
CanItransport
quicklyandsmoothly
(e.g.fromboatto
traintotruck)
Cargo Transport Pre-1960
? ? ? ? ? ? ?
? ? ? ? ? ? ?
? ? ? ? ? ? ?
? ? ? ? ? ? ?
? ? ? ? ? ? ?
? ? ? ? ? ? ?
Also a matrix from hell
Multiplicityof
Goods
Multiplicityof
methodsfor
transporting/stori
ng
DoIworryabout
howgoodsinteract
(e.g.coffeebeans
nexttospices)
CanItransport
quicklyand
smoothly
(e.g.fromboatto
traintotruck)
Solution: Intermodal Shipping Container
…in between, can be loaded and
unloaded, stacked, transported
efficiently over long distances, and
transferred from one mode of
transport to another
A standard container that is
loaded with virtually any goods,
and stays sealed until it reaches
final delivery.
Static website Web frontendUser DB Queue Analytics DB
Development
VM
QA server Public Cloud Contributor’s
laptop
Docker is a shipping container system for
code
Multiplicityof
Stacks
Multiplicityof
hardware
environments
Production
Cluster
Customer Data
Center
Doservicesand
appsinteract
appropriately?
CanImigrate
smoothlyand
quickly
…that can be manipulated using
standard operations and run
consistently on virtually any
hardware platform
An engine that enables any
payload to be encapsulated as
a lightweight, portable, self-
sufficient container…
Static website
Web frontend
Background workers
User DB
Analytics DB
Queue
Development
VM
QA Server
Single Prod
Server
Onsite
Cluster
Public Cloud
Contributor’s
laptop
Customer
Servers
Docker eliminates the matrix from Hell
Why Developers Care
• Build once, run anywhere
• A clean, safe, hygienic and portable runtime
environment for your app.
• No worries about missing dependencies, packages and
other pain points during subsequent deployments.
• Run each app in its own isolated container, so you can
run various versions of libraries and other
dependencies for each app without worrying
Why Developers Care
• Automate testing, integration, packaging…anything
you can script
• Reduce/eliminate concerns about compatibility on
different platforms, either your own or your customers.
• Cheap, zero-penalty containers to deploy services? A
VM without the overhead of a VM? Instant replay and
reset of image snapshots? That’s the power of Docker
Why Devops Cares?
• Configure once…run anything
• Make the entire lifecycle more efficient, consistent, and
repeatable
• Increase the quality of code produced by developers.
• Eliminate inconsistencies between development, test,
production, and customer environments
Why Devops Cares?
• Support segregation of duties
• Significantly improves the speed and reliability of
continuous deployment and continuous integration
systems
• Because the containers are so lightweight, address
significant performance, costs, deployment, and
portability issues normally associated with VMs
Why it works—separation of concerns
• The Developer
• Worries about
what’s “inside” the
container
• His code
• His Libraries
• His Package
Manager
• His Apps
• His Data
• All Linux servers
look the same
• The Administrator
• Worries about
what’s “outside”
the container
• Logging
• Remote access
• Monitoring
• Network config
• All containers
start, stop, copy,
attach, migrate,
etc. the same way
More technical explanation
• High Level—It’s a lightweight
VM
• Own process space
• Own network interface
• Can run stuff as root
• Can have its own /sbin/init
(different from host)
• Low Level—It’s chroot on steroids
• Can also not have its own /sbin/init
• Container=isolated processes
• Share kernel with host
• No device emulation (neither HVM
nor PV) from host)
• Run everywhere
• Regardless of kernel
version (2.6.32+)
• Regardless of host distro
• Physical or virtual, cloud
or not
• Container and host
architecture must
match*
• Run anything
• If it can run on the host,
it can run in the
container
• i.e. if it can run on a Linux
kernel, it can run
WHY WHAT
App
A
Containers vs. VMs
Hypervisor (Type 2)
Host OS
Server
Guest
OS
Bins/
Libs
App
A’
Guest
OS
Bins/
Libs
App
B
Guest
OS
Bins/
Libs
AppA’
Docker
Host OS
Server
Bins/Libs
AppA
Bins/Libs
AppB
AppB’
AppB’
AppB’
VM
Container
Containers are isolated,
but share OS and, where
appropriate,
bins/libraries
Guest
OS
Guest
OS
…result is significantly faster
deployment, much less overhead,
easier migration, faster restart
Why are Docker containers lightweight?
Bins/
Libs
App
A
Original App
(No OS to take
up space, resources,
or require restart)
AppΔ
Bins
/
App
A
Bins/
Libs
App
A’
Guest
OS
Bins/
Libs
Modified App
Copy on write
capabilities allow
us to only save the
diffs
Between container
A and container
A’
VMs
Every app, every copy of an
app, and every slight modification
of the app requires a new virtual server
App
A
Guest
OS
Bins/
Libs
Copy of
App
No OS. Can
Share bins/libs
App
A
Guest
OS
Guest
OS
VMs Containers
What are the basics of the Docker system?
Source
Code
Repository
Dockerfile
For
A
Docker Engine
Docker
Container
Image
Registry
Build
Docker
Host 2 OS (Linux)
ContainerA
ContainerB
ContainerC
ContainerA
Push
Search Pull
Run
Host 1 OS (Linux)
Changes and Updates
Docker Engine
Docker
Container
Image
Registry
Docker Engine
Push
Update
Bins/
Libs
App
A
AppΔ
Bins
/
Base
Container
Image
Host is now running A’’
Container
Mod A’’
AppΔ
Bins
/
Bins/
Libs
App
A
Bins
/
Bins/
Libs
App
A’’
Host running A wants to upgrade to A’’.
Requests update. Gets only diffs
Container
Mod A’
Ecosystem Support
• Operating systems
• Virtually any distribution with a 2.6.32+ kernel
• Red Hat/Docker collaboration to make work across
RHEL 6.4+, Fedora, and other members of the
family (2.6.32 +)
• CoreOS—Small core OS purpose built with Docker
• OpenStack
• Docker integration into NOVA (& compatibility with
Glance, Horizon, etc.) accepted for Havana release
• Private PaaS
• OpenShift
• Solum (Rackspace, OpenStack)
• Other TBA
• Public PaaS
• Deis, Voxoz, Cocaine (Yandex), Baidu PaaS
Ecosystem Support
• Public IaaS
• Native support in Rackspace, Digital Ocean,+++
• AMI (or equivalent) available for AWS & other
• DevOps Tools
• Integrations with Chef, Puppet, Jenkins, Travis,
Salt, Ansible +++
• Orchestration tools
• Mesos, Heat, ++
• Shipyard & others purpose built for Docker
• Applications
• 1000’s of Dockerized applications available at
index.docker.io
Use Cases
Use Case Examples
Clusters
Building a MongoDB cluster using docker
Production Quality MongoDB Setup with Docker
Wildfly cluster using Docker on Fedora
Build your own PaaS OpenSource PaaS built on Docker, Chef, and Heroku
Buildpacks
Web Based Environment for Instruction JiffyLab – web based environment for the instruction, or
lightweight use of, Python and UNIX shell
Easy Application Deployment
Deploy Java Apps With Docker = Awesome
How to put your development environment on docker
Running Drupal on Docker
Installing Wordpress on Docker
Use Cases
Use Case Examples
Create Secure Sandboxes Docker makes creating secure sandboxes easier than ever
Create your own SaaS Memcached as a Service
Automated Application Deployment Multi-cloud Deployment with Docker
Continuous Integration and Deployment
Next Generation Continuous Integration & Deployment
with dotCloud’s Docker and Strider
Testing Salt States Rapidly With Docker
Lightweight Desktop Virtualization
Docker Desktop: Your Desktop Over SSH Running Inside
Of A Docker Container
Docker Architecture
Namespaces
• Docker takes advantage of a technology called namespaces to
provide the isolated workspace we call the container.
• When you run a container, Docker creates a set of namespaces for
that container.
• Some of the namespaces that Docker Engine uses on Linux are:
1. The pid namespace: Process isolation (PID: Process ID).
2. The net namespace: Managing network interfaces (NET:
Networking).
3. The ipc namespace: Managing access to IPC resources (IPC:
InterProcess Communication).
4. The mnt namespace: Managing mount-points (MNT: Mount).
5. The uts namespace: Isolating kernel and version identifiers. (UTS:
Unix Timesharing System)
Control groups
• Docker Engine on Linux also makes use of another
technology called cgroups or control groups.
• A key to running applications in isolation is to have them
only use the resources you want.
• This ensures containers are good multi-tenant citizens on
a host.
• Control groups allow Docker Engine to share available
hardware resources to containers and, if required, set up
limits and constraints.
• For example, limiting the memory available to a specific
container.
Docker Architecture
Docker Engine
Docker Engine is a client-server application with these
major components:
• A server which is a type of long-running program called a
daemon process.
• A REST API which specifies interfaces that programs can
use to talk to the daemon and instruct it what to do.
• A command line interface (CLI) client.
Docker Engine
Docker images
• A Docker image is a read-only template. For example, an
image could contain an Ubuntu operating system with
Apache and your web application installed.
• Images are used to create Docker containers. Docker
provides a simple way to build new images or update
existing images, or you can download Docker images that
other people have already created.
• Docker images are the build component of Docker.
Docker File
• Docker can build images automatically by reading the
instructions from a Dockerfile.
• A Dockerfile is a text document that contains all the
commands a user could call on the command line to assemble
an image.
• Using docker build users can create an automated build that
executes several command-line instructions in succession.
• The docker build command builds an image from a Dockerfile
and a context.
Docker File - Example
• Instructions
INSTRUCTION arguments
Eg. RUN echo 'we are running some # of cool things!’
• Parser directives:
FROM ImageName
Example:
#Comment
FROM windowsservercore
COPY testfile.txt c:
RUN dir c:
To Build image using this file:
docker build -f /path/to/a/Dockerfile .
Docker Hub
• Docker registries hold images.
• These are public or private stores from which you upload
or download images.
• The public Docker registry is provided with the Docker
Hub. (hub.docker.com)
• It serves a huge collection of existing images for your use.
These can be images you create yourself or you can use
images that others have previously created.
• Docker registries are the distribution component of
Docker.
Docker CLI
• The CLI makes use of the Docker REST API to control or
interact with the Docker daemon through scripting or
direct CLI commands.
• Many other Docker applications make use of the
underlying API and CLI.
• The CLI is also used to issue commands.
Kubernetes
• Kubernetes is an open-source platform for
automating deployment, scaling, and
operations of application containers across
clusters of hosts, providing container-centric
infrastructure.
• With Kubernetes, you can:
• Deploy your applications quickly and predictably.
• Scale your applications on the fly.
• Seamlessly roll out new features.
• Optimize use of your hardware by using only the
resources you need
Kubernetes Architecture
Kubernetes Features
Kubernetes is:
• portable: public, private, hybrid, multi-cloud
• extensible: modular, pluggable, hookable,
composable
• self-healing: auto-placement, auto-restart,
auto-replication, auto-scaling
The Kubernetes project was started by Google
in 2014.
Demo Time!
Q&A
Thank you

Mais conteúdo relacionado

Mais procurados

Docker introduction for the beginners
Docker introduction for the beginnersDocker introduction for the beginners
Docker introduction for the beginnersJuneyoung Oh
 
Docker Explained | What Is A Docker Container? | Docker Simplified | Docker T...
Docker Explained | What Is A Docker Container? | Docker Simplified | Docker T...Docker Explained | What Is A Docker Container? | Docker Simplified | Docker T...
Docker Explained | What Is A Docker Container? | Docker Simplified | Docker T...Edureka!
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to DockerLuong Vo
 
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...Simplilearn
 
Introduction to Docker Compose
Introduction to Docker ComposeIntroduction to Docker Compose
Introduction to Docker ComposeAjeet Singh Raina
 
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...Edureka!
 
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...Simplilearn
 
Introduction to Docker - VIT Campus
Introduction to Docker - VIT CampusIntroduction to Docker - VIT Campus
Introduction to Docker - VIT CampusAjeet Singh Raina
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to dockerInstruqt
 
Docker Swarm 0.2.0
Docker Swarm 0.2.0Docker Swarm 0.2.0
Docker Swarm 0.2.0Docker, Inc.
 
Docker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker, Inc.
 
Docker introduction
Docker introductionDocker introduction
Docker introductiondotCloud
 
Docker Swarm for Beginner
Docker Swarm for BeginnerDocker Swarm for Beginner
Docker Swarm for BeginnerShahzad Masud
 
How to write a Dockerfile
How to write a DockerfileHow to write a Dockerfile
How to write a DockerfileKnoldus Inc.
 

Mais procurados (20)

Docker introduction for the beginners
Docker introduction for the beginnersDocker introduction for the beginners
Docker introduction for the beginners
 
Docker Explained | What Is A Docker Container? | Docker Simplified | Docker T...
Docker Explained | What Is A Docker Container? | Docker Simplified | Docker T...Docker Explained | What Is A Docker Container? | Docker Simplified | Docker T...
Docker Explained | What Is A Docker Container? | Docker Simplified | Docker T...
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
 
Introduction to Docker Compose
Introduction to Docker ComposeIntroduction to Docker Compose
Introduction to Docker Compose
 
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
 
Dockerfile
Dockerfile Dockerfile
Dockerfile
 
Docker Basics
Docker BasicsDocker Basics
Docker Basics
 
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...
 
What is Docker
What is DockerWhat is Docker
What is Docker
 
Introduction to Docker - VIT Campus
Introduction to Docker - VIT CampusIntroduction to Docker - VIT Campus
Introduction to Docker - VIT Campus
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Docker Swarm 0.2.0
Docker Swarm 0.2.0Docker Swarm 0.2.0
Docker Swarm 0.2.0
 
Docker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker 101: Introduction to Docker
Docker 101: Introduction to Docker
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Docker Swarm for Beginner
Docker Swarm for BeginnerDocker Swarm for Beginner
Docker Swarm for Beginner
 
Multi Stage Docker Build
Multi Stage Docker Build Multi Stage Docker Build
Multi Stage Docker Build
 
Introduction to container based virtualization with docker
Introduction to container based virtualization with dockerIntroduction to container based virtualization with docker
Introduction to container based virtualization with docker
 
How to write a Dockerfile
How to write a DockerfileHow to write a Dockerfile
How to write a Dockerfile
 

Destaque

Immutable infrastructure with Docker and EC2
Immutable infrastructure with Docker and EC2Immutable infrastructure with Docker and EC2
Immutable infrastructure with Docker and EC2dotCloud
 
DockerCon Keynote Ben Golub
DockerCon Keynote Ben GolubDockerCon Keynote Ben Golub
DockerCon Keynote Ben GolubdotCloud
 
Why Docker
Why DockerWhy Docker
Why DockerdotCloud
 
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 ContainersJérôme Petazzoni
 
Integrating Docker EE into Société Générale's Existing Enterprise IT Systems
Integrating Docker EE into Société Générale's Existing Enterprise IT SystemsIntegrating Docker EE into Société Générale's Existing Enterprise IT Systems
Integrating Docker EE into Société Générale's Existing Enterprise IT SystemsDocker, Inc.
 

Destaque (6)

Immutable infrastructure with Docker and EC2
Immutable infrastructure with Docker and EC2Immutable infrastructure with Docker and EC2
Immutable infrastructure with Docker and EC2
 
DockerCon Keynote Ben Golub
DockerCon Keynote Ben GolubDockerCon Keynote Ben Golub
DockerCon Keynote Ben Golub
 
Docker by Example - Basics
Docker by Example - Basics Docker by Example - Basics
Docker by Example - Basics
 
Why Docker
Why DockerWhy Docker
Why Docker
 
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
 
Integrating Docker EE into Société Générale's Existing Enterprise IT Systems
Integrating Docker EE into Société Générale's Existing Enterprise IT SystemsIntegrating Docker EE into Société Générale's Existing Enterprise IT Systems
Integrating Docker EE into Société Générale's Existing Enterprise IT Systems
 

Semelhante a Introduction to Docker

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
 
Docker - Portable Deployment
Docker - Portable DeploymentDocker - Portable Deployment
Docker - Portable Deploymentjavaonfly
 
The challenge of application distribution - Introduction to Docker (2014 dec ...
The challenge of application distribution - Introduction to Docker (2014 dec ...The challenge of application distribution - Introduction to Docker (2014 dec ...
The challenge of application distribution - Introduction to Docker (2014 dec ...Sébastien Portebois
 
Intro to Docker November 2013
Intro to Docker November 2013Intro to Docker November 2013
Intro to Docker November 2013Docker, Inc.
 
Intro Docker october 2013
Intro Docker october 2013Intro Docker october 2013
Intro Docker october 2013dotCloud
 
Docker open stack boston
Docker open stack bostonDocker open stack boston
Docker open stack bostondotCloud
 
Docker and OpenStack Boston Meetup
Docker and OpenStack Boston MeetupDocker and OpenStack Boston Meetup
Docker and OpenStack Boston MeetupKamesh Pemmaraju
 
Dockers and kubernetes
Dockers and kubernetesDockers and kubernetes
Dockers and kubernetesDr Ganesh Iyer
 
Docker intro
Docker introDocker intro
Docker introspiddy
 
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12dotCloud
 
Application Deployment on Openstack
Application Deployment on OpenstackApplication Deployment on Openstack
Application Deployment on OpenstackDocker, Inc.
 
Docker - A curtain raiser to the Container world
Docker - A curtain raiser to the Container worldDocker - A curtain raiser to the Container world
Docker - A curtain raiser to the Container worldzekeLabs Technologies
 
Docker-Hanoi @DKT , Presentation about Docker Ecosystem
Docker-Hanoi @DKT , Presentation about Docker EcosystemDocker-Hanoi @DKT , Presentation about Docker Ecosystem
Docker-Hanoi @DKT , Presentation about Docker EcosystemVan Phuc
 

Semelhante a Introduction to Docker (20)

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
 
Docker - Portable Deployment
Docker - Portable DeploymentDocker - Portable Deployment
Docker - Portable Deployment
 
The challenge of application distribution - Introduction to Docker (2014 dec ...
The challenge of application distribution - Introduction to Docker (2014 dec ...The challenge of application distribution - Introduction to Docker (2014 dec ...
The challenge of application distribution - Introduction to Docker (2014 dec ...
 
Intro to Docker November 2013
Intro to Docker November 2013Intro to Docker November 2013
Intro to Docker November 2013
 
Docker-Intro
Docker-IntroDocker-Intro
Docker-Intro
 
OpenStack Summit
OpenStack SummitOpenStack Summit
OpenStack Summit
 
Intro Docker october 2013
Intro Docker october 2013Intro Docker october 2013
Intro Docker october 2013
 
Docker open stack boston
Docker open stack bostonDocker open stack boston
Docker open stack boston
 
OpenStack Boston
OpenStack BostonOpenStack Boston
OpenStack Boston
 
Docker and OpenStack Boston Meetup
Docker and OpenStack Boston MeetupDocker and OpenStack Boston Meetup
Docker and OpenStack Boston Meetup
 
Docker intro
Docker introDocker intro
Docker intro
 
Dockers and kubernetes
Dockers and kubernetesDockers and kubernetes
Dockers and kubernetes
 
Docker intro
Docker introDocker intro
Docker intro
 
Containers and Docker
Containers and DockerContainers and Docker
Containers and Docker
 
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
 
Application Deployment on Openstack
Application Deployment on OpenstackApplication Deployment on Openstack
Application Deployment on Openstack
 
Webinar Docker Tri Series
Webinar Docker Tri SeriesWebinar Docker Tri Series
Webinar Docker Tri Series
 
What is Docker?
What is Docker?What is Docker?
What is Docker?
 
Docker - A curtain raiser to the Container world
Docker - A curtain raiser to the Container worldDocker - A curtain raiser to the Container world
Docker - A curtain raiser to the Container world
 
Docker-Hanoi @DKT , Presentation about Docker Ecosystem
Docker-Hanoi @DKT , Presentation about Docker EcosystemDocker-Hanoi @DKT , Presentation about Docker Ecosystem
Docker-Hanoi @DKT , Presentation about Docker Ecosystem
 

Último

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
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 BrazilV3cube
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
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 AutomationSafe Software
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 

Último (20)

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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - 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...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

Introduction to Docker

  • 2. Contents • Introduction to Containers • What is Docker? • Docker Architecture • Installing Docker • Docker Engine • Docker Images • Docker File • Docker Hub • Docker CLI • Kubernetes • Hands On Demo
  • 3. Containers • LXC (Linux Containers) is an operating-system-level virtualization method for running multiple isolated Linux systems (containers) on a control host using a single Linux kernel. • The Linux kernel provides the cgroups functionality that allows limitation and prioritization of resources (CPU, memory, block I/O, network, etc.) without the need for starting any virtual machines, and namespace isolation functionality that allows complete isolation of an applications' view of the operating environment, including process trees, networking, user IDs and mounted file systems
  • 5. What is Docker • Docker is an open-source project that automates the deployment of applications inside software container • Docker containers wrap up a piece of software in a complete file system that contains everything it needs to run: code, runtime, system tools, system libraries – anything you can install on a server. • This guarantees that it will always run the same, regardless of the environment it is running in.
  • 6. Static website Web frontend User DB Queue Analytics DB Background workers API endpoint nginx 1.5 + modsecurity + openssl + bootstrap 2 postgresql + pgv8 + v8 hadoop + hive + thrift + OpenJDK Ruby + Rails + sass + Unicorn Redis + redis-sentinel Python 3.0 + celery + pyredis + libcurl + ffmpeg + libopencv + nodejs + phantomjs Python 2.7 + Flask + pyredis + celery + psycopg + postgresql-client Development VM QA server Public Cloud Disaster recovery Contributor’s laptop Production Servers The Challenge Multiplicityof Stacks Multiplicityof hardware environments Production Cluster Customer Data Center Doservicesand appsinteract appropriately? CanImigrate smoothlyand quickly?
  • 7. The Matrix From Hell Static website Web frontend Background workers User DB Analytics DB Queue Development VM QA Server Single Prod Server Onsite Cluster Public Cloud Contributor’s laptop Customer Servers ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
  • 9. ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Also a matrix from hell
  • 10. Multiplicityof Goods Multiplicityof methodsfor transporting/stori ng DoIworryabout howgoodsinteract (e.g.coffeebeans nexttospices) CanItransport quicklyand smoothly (e.g.fromboatto traintotruck) Solution: Intermodal Shipping Container …in between, can be loaded and unloaded, stacked, transported efficiently over long distances, and transferred from one mode of transport to another A standard container that is loaded with virtually any goods, and stays sealed until it reaches final delivery.
  • 11. Static website Web frontendUser DB Queue Analytics DB Development VM QA server Public Cloud Contributor’s laptop Docker is a shipping container system for code Multiplicityof Stacks Multiplicityof hardware environments Production Cluster Customer Data Center Doservicesand appsinteract appropriately? CanImigrate smoothlyand quickly …that can be manipulated using standard operations and run consistently on virtually any hardware platform An engine that enables any payload to be encapsulated as a lightweight, portable, self- sufficient container…
  • 12. Static website Web frontend Background workers User DB Analytics DB Queue Development VM QA Server Single Prod Server Onsite Cluster Public Cloud Contributor’s laptop Customer Servers Docker eliminates the matrix from Hell
  • 13. Why Developers Care • Build once, run anywhere • A clean, safe, hygienic and portable runtime environment for your app. • No worries about missing dependencies, packages and other pain points during subsequent deployments. • Run each app in its own isolated container, so you can run various versions of libraries and other dependencies for each app without worrying
  • 14. Why Developers Care • Automate testing, integration, packaging…anything you can script • Reduce/eliminate concerns about compatibility on different platforms, either your own or your customers. • Cheap, zero-penalty containers to deploy services? A VM without the overhead of a VM? Instant replay and reset of image snapshots? That’s the power of Docker
  • 15. Why Devops Cares? • Configure once…run anything • Make the entire lifecycle more efficient, consistent, and repeatable • Increase the quality of code produced by developers. • Eliminate inconsistencies between development, test, production, and customer environments
  • 16. Why Devops Cares? • Support segregation of duties • Significantly improves the speed and reliability of continuous deployment and continuous integration systems • Because the containers are so lightweight, address significant performance, costs, deployment, and portability issues normally associated with VMs
  • 17. Why it works—separation of concerns • The Developer • Worries about what’s “inside” the container • His code • His Libraries • His Package Manager • His Apps • His Data • All Linux servers look the same • The Administrator • Worries about what’s “outside” the container • Logging • Remote access • Monitoring • Network config • All containers start, stop, copy, attach, migrate, etc. the same way
  • 18. More technical explanation • High Level—It’s a lightweight VM • Own process space • Own network interface • Can run stuff as root • Can have its own /sbin/init (different from host) • Low Level—It’s chroot on steroids • Can also not have its own /sbin/init • Container=isolated processes • Share kernel with host • No device emulation (neither HVM nor PV) from host) • Run everywhere • Regardless of kernel version (2.6.32+) • Regardless of host distro • Physical or virtual, cloud or not • Container and host architecture must match* • Run anything • If it can run on the host, it can run in the container • i.e. if it can run on a Linux kernel, it can run WHY WHAT
  • 19. App A Containers vs. VMs Hypervisor (Type 2) Host OS Server Guest OS Bins/ Libs App A’ Guest OS Bins/ Libs App B Guest OS Bins/ Libs AppA’ Docker Host OS Server Bins/Libs AppA Bins/Libs AppB AppB’ AppB’ AppB’ VM Container Containers are isolated, but share OS and, where appropriate, bins/libraries Guest OS Guest OS …result is significantly faster deployment, much less overhead, easier migration, faster restart
  • 20. Why are Docker containers lightweight? Bins/ Libs App A Original App (No OS to take up space, resources, or require restart) AppΔ Bins / App A Bins/ Libs App A’ Guest OS Bins/ Libs Modified App Copy on write capabilities allow us to only save the diffs Between container A and container A’ VMs Every app, every copy of an app, and every slight modification of the app requires a new virtual server App A Guest OS Bins/ Libs Copy of App No OS. Can Share bins/libs App A Guest OS Guest OS VMs Containers
  • 21. What are the basics of the Docker system? Source Code Repository Dockerfile For A Docker Engine Docker Container Image Registry Build Docker Host 2 OS (Linux) ContainerA ContainerB ContainerC ContainerA Push Search Pull Run Host 1 OS (Linux)
  • 22. Changes and Updates Docker Engine Docker Container Image Registry Docker Engine Push Update Bins/ Libs App A AppΔ Bins / Base Container Image Host is now running A’’ Container Mod A’’ AppΔ Bins / Bins/ Libs App A Bins / Bins/ Libs App A’’ Host running A wants to upgrade to A’’. Requests update. Gets only diffs Container Mod A’
  • 23. Ecosystem Support • Operating systems • Virtually any distribution with a 2.6.32+ kernel • Red Hat/Docker collaboration to make work across RHEL 6.4+, Fedora, and other members of the family (2.6.32 +) • CoreOS—Small core OS purpose built with Docker • OpenStack • Docker integration into NOVA (& compatibility with Glance, Horizon, etc.) accepted for Havana release • Private PaaS • OpenShift • Solum (Rackspace, OpenStack) • Other TBA • Public PaaS • Deis, Voxoz, Cocaine (Yandex), Baidu PaaS
  • 24. Ecosystem Support • Public IaaS • Native support in Rackspace, Digital Ocean,+++ • AMI (or equivalent) available for AWS & other • DevOps Tools • Integrations with Chef, Puppet, Jenkins, Travis, Salt, Ansible +++ • Orchestration tools • Mesos, Heat, ++ • Shipyard & others purpose built for Docker • Applications • 1000’s of Dockerized applications available at index.docker.io
  • 25. Use Cases Use Case Examples Clusters Building a MongoDB cluster using docker Production Quality MongoDB Setup with Docker Wildfly cluster using Docker on Fedora Build your own PaaS OpenSource PaaS built on Docker, Chef, and Heroku Buildpacks Web Based Environment for Instruction JiffyLab – web based environment for the instruction, or lightweight use of, Python and UNIX shell Easy Application Deployment Deploy Java Apps With Docker = Awesome How to put your development environment on docker Running Drupal on Docker Installing Wordpress on Docker
  • 26. Use Cases Use Case Examples Create Secure Sandboxes Docker makes creating secure sandboxes easier than ever Create your own SaaS Memcached as a Service Automated Application Deployment Multi-cloud Deployment with Docker Continuous Integration and Deployment Next Generation Continuous Integration & Deployment with dotCloud’s Docker and Strider Testing Salt States Rapidly With Docker Lightweight Desktop Virtualization Docker Desktop: Your Desktop Over SSH Running Inside Of A Docker Container
  • 28. Namespaces • Docker takes advantage of a technology called namespaces to provide the isolated workspace we call the container. • When you run a container, Docker creates a set of namespaces for that container. • Some of the namespaces that Docker Engine uses on Linux are: 1. The pid namespace: Process isolation (PID: Process ID). 2. The net namespace: Managing network interfaces (NET: Networking). 3. The ipc namespace: Managing access to IPC resources (IPC: InterProcess Communication). 4. The mnt namespace: Managing mount-points (MNT: Mount). 5. The uts namespace: Isolating kernel and version identifiers. (UTS: Unix Timesharing System)
  • 29. Control groups • Docker Engine on Linux also makes use of another technology called cgroups or control groups. • A key to running applications in isolation is to have them only use the resources you want. • This ensures containers are good multi-tenant citizens on a host. • Control groups allow Docker Engine to share available hardware resources to containers and, if required, set up limits and constraints. • For example, limiting the memory available to a specific container.
  • 31. Docker Engine Docker Engine is a client-server application with these major components: • A server which is a type of long-running program called a daemon process. • A REST API which specifies interfaces that programs can use to talk to the daemon and instruct it what to do. • A command line interface (CLI) client.
  • 33. Docker images • A Docker image is a read-only template. For example, an image could contain an Ubuntu operating system with Apache and your web application installed. • Images are used to create Docker containers. Docker provides a simple way to build new images or update existing images, or you can download Docker images that other people have already created. • Docker images are the build component of Docker.
  • 34. Docker File • Docker can build images automatically by reading the instructions from a Dockerfile. • A Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image. • Using docker build users can create an automated build that executes several command-line instructions in succession. • The docker build command builds an image from a Dockerfile and a context.
  • 35. Docker File - Example • Instructions INSTRUCTION arguments Eg. RUN echo 'we are running some # of cool things!’ • Parser directives: FROM ImageName Example: #Comment FROM windowsservercore COPY testfile.txt c: RUN dir c: To Build image using this file: docker build -f /path/to/a/Dockerfile .
  • 36. Docker Hub • Docker registries hold images. • These are public or private stores from which you upload or download images. • The public Docker registry is provided with the Docker Hub. (hub.docker.com) • It serves a huge collection of existing images for your use. These can be images you create yourself or you can use images that others have previously created. • Docker registries are the distribution component of Docker.
  • 37. Docker CLI • The CLI makes use of the Docker REST API to control or interact with the Docker daemon through scripting or direct CLI commands. • Many other Docker applications make use of the underlying API and CLI. • The CLI is also used to issue commands.
  • 38. Kubernetes • Kubernetes is an open-source platform for automating deployment, scaling, and operations of application containers across clusters of hosts, providing container-centric infrastructure. • With Kubernetes, you can: • Deploy your applications quickly and predictably. • Scale your applications on the fly. • Seamlessly roll out new features. • Optimize use of your hardware by using only the resources you need
  • 40. Kubernetes Features Kubernetes is: • portable: public, private, hybrid, multi-cloud • extensible: modular, pluggable, hookable, composable • self-healing: auto-placement, auto-restart, auto-replication, auto-scaling The Kubernetes project was started by Google in 2014.
  • 41.
  • 42.
  • 44. Q&A