More Related Content Similar to Docker 101 - High level introduction to docker (20) More from Dr Ganesh Iyer (20) Docker 101 - High level introduction to docker2. © 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.2
Tech Support Manager at Progress, Hyderabad, India
Masters & Ph.D. from National University of Singapore
Interests: Kathakali, Traveling, Photography, Cooking
http://ganeshniyer.com
GANESHNIYER
About Me
3. © 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.3
Agenda
Need for Docker/Container
Why containers matter?
Docker / Container vs Virtual Machine
Basics of Docker
Getting Started
6. © 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.6
Multiplicityof
Goods
Multiplicityof
methodsfor
transporting/storing
DoIworryabout
howgoodsinteract
(e.g.coffeebeans
nexttospices)
CanItransport
quicklyandsmoothly
(e.g.fromboatto
traintotruck)
Cargo Transport Pre-1960
7. © 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.7
? ? ? ? ? ? ?
? ? ? ? ? ? ?
? ? ? ? ? ? ?
? ? ? ? ? ? ?
? ? ? ? ? ? ?
? ? ? ? ? ? ?
Also an M x N Matrix
8. © 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.8
Multiplicityof
Goods
Multiplicityof
methodsfor
transporting/storing
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.
9. © 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.9
This eliminated the M x N problem…
10. © 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.10
and spawned an Intermodal Shipping Container Ecosystem
• 90% of all cargo now shipped in a standard container
• Order of magnitude reduction in cost and time to load and unload ships
• Massive reduction in losses due to theft or damage
• Huge reduction in freight cost as percent of final goods (from >25% to <3%) massive globalizations
• 5000 ships deliver 200M containers per year
11. © 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.11
What is Docker?
Docker containers wrap a
piece of software in a
complete filesystem that
contains everything needed to
run: code, runtime, system
tools, system libraries –
anything that can be installed
on a server. This guarantees
that the software will always
run the same, regardless of
its environment.
[www.docker.com]
http://altinvesthq.com/news/wp-content/uploads/2015/06/container-ship.jpg
12. © 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.12
What is Docker?
Developers use Docker to eliminate “works on my machine” problems
when collaborating on code with co-workers.
Operators use Docker to run and manage apps side-by-side in
isolated containers to get better compute density.
Enterprises use Docker to build agile software delivery pipelines to
ship new features faster, more securely and with confidence for both
Linux and Windows Server apps.
[www.docker.com]
13. © 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.13
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?
14. © 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.14
Results in M x N compatibility nightmare
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
? ? ? ? ? ? ?
? ? ? ? ? ? ?
? ? ? ? ? ? ?
? ? ? ? ? ? ?
? ? ? ? ? ? ?
? ? ? ? ? ? ?
15. © 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.15
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…
16. © 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.16
Static website Web frontendUser DB Queue Analytics DB
Development
VM
QA server Public Cloud Contributor’s
laptop
Or…put more simply
Multiplicityof
Stacks
Multiplicityof
hardware
environments
Production
Cluster
Customer Data
Center
Doservicesand
appsinteract
appropriately?
CanImigrate
smoothlyand
quickly
Operator: Configure Once, Run
Anything
Developer: Build Once, Run
Anywhere (Finally)
17. © 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.17
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 solves the M x N problem
18. © 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.18
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
19. © 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.19
Why containers matter
Physical Containers Docker
Content Agnostic The same container can hold almost
any type of cargo
Can encapsulate any payload and its
dependencies
Hardware Agnostic Standard shape and interface allow
same container to move from ship to
train to semi-truck to warehouse to
crane without being modified or
opened
Using operating system primitives (e.g.
LXC) can run consistently on virtually
any hardware—VMs, bare metal,
openstack, public IAAS, etc.—without
modification
Content Isolation and
Interaction
No worry about anvils crushing
bananas. Containers can be stacked
and shipped together
Resource, network, and content
isolation. Avoids dependency hell
Automation Standard interfaces make it easy to
automate loading, unloading, moving,
etc.
Standard operations to run, start, stop,
commit, search, etc. Perfect for devops:
CI, CD, autoscaling, hybrid clouds
Highly efficient No opening or modification, quick to
move between waypoints
Lightweight, virtually no perf or start-up
penalty, quick to move and manipulate
Separation of duties Shipper worries about inside of box,
carrier worries about outside of box
Developer worries about code. Ops
worries about infrastructure.
20. © 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.20
Docker containers
Lightweight
• Containers running on
one machine all share
the same OS kernel
• They start instantly
and make more
efficient use of RAM
• Images are
constructed from
layered file systems
• They can share
common files, making
disk usage and image
downloads much
more efficient
Open
• Based on open
standards
• Allowing containers to
run on all major Linux
distributions and
Microsoft OS with
support for every
infrastructure
Secure
• Containers isolate
applications from
each other and the
underlying
infrastructure while
providing an added
layer of protection for
the application
21. © 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.21
Docker / Containers vs. Virtual Machine
https://www.docker.com/whatisdocker/
Containers have similar resource
isolation and allocation benefits as
VMs but a different architectural
approach allows them to be much
more portable and efficient
22. © 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.22
Docker / Containers vs. Virtual Machine
https://www.docker.com/whatisdocker/
• Each virtual machine includes the application,
the necessary binaries and libraries and an
entire guest operating system - all of which
may be tens of GBs in size
• It includes the application and all of its
dependencies, but share the kernel with other
containers.
• They run as an isolated process in userspace
on the host operating system.
• Docker containers run on any computer, on
any infrastructure and in any cloud
23. © 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.23
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’
Gues
t
OS
Bins/
Libs
Modified App
Union file system allows
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
24. © 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.24
What are the basics of the Docker system?
Source
Code
Repository
Dockerfile
For
A
Docker Engine
Docker
Container
Image
Registry
Build
Docker Engine
Host 2 OS 2 (Windows / Linux)
Container
A
Container
B
Container
C
ContainerA
Push
Search
Pull
Run
Host 1 OS (Linux)
25. © 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.25
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’
26. © 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.26
Easily Share and Collaborate on Applications
Distribute and share content
• Store, distribute and manage your Docker images in your Docker
Hub with your team
• Image updates, changes and history are automatically shared
across your organization.
Simply share your application with others
• Ship your containers to others without worrying about different
environment dependencies creating issues with your application.
• Other teams can easily link to or test against your app without
having to learn or worry about how it works.
Docker creates a common framework for developers and sysadmins to work
together on distributed applications
27. © 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.27
Get Started with Docker
Install Docker
Run a software image in a container
Browse for an image on Docker Hub
Create your own image and run it in a container
Create a Docker Hub account and an image repository
Create an image of your own
Push your image to Docker Hub for others to use
https://www.docker.com/products/docker
https://www.docker.com/products/docker-toolbox
28. © 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.28
Docker Container as a Service (CaaS)
Deliver an IT secured and managed application environment for developers
to build and deploy applications in a self service manner
29. © 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.29
Typical Use cases
30. © 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.30
App Modernization
31. © 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.31
Continuous Integration and Deployment (CI / CD)
The modern development pipeline is fast, continuous and automated with the goal of
more reliable software
CI/CD allows teams to integrate new code as often as every time code is checked in by
developers and passes testing
A cornerstone of devops methodology, CI/CD creates a real time feedback loop with a
constant stream of small iterative changes that accelerates change and improves
quality
CI environments are often fully automated to trigger a test at git push and to
automatically build a new image if the test is successful and push to a Docker Registry
Further automation and scripting can deploy a container from the new image to staging
for further testing.
32. © 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.32
Microservices
App architecture is changing from monolithic code bases with waterfall
development methodologies to loosely coupled services that are
developed and deployed independently
Tens to thousands of these services can be connected to form an app
Docker allows developers are able to choose the best tool or stack for
each service and isolates them to eliminate any potential conflicts and
avoids the “matrix from hell.”
These containers can be easily shared, deployed, updated and scaled
instantly and independently of the other services that make up the app
Docker’s end to end security features allow teams to build and operate a
least privilege microservices model where services only get access to the
resources (other apps, secrets, compute) they need to run at just the
right time to create.
33. © 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.33
IT Infrastructure optimization
Docker and containers help optimize the utilization and cost
of your IT infrastructure
Optimization not just cost reduction, it is ensuring the right
amount of resources are available at the right time and
used efficiently
Because containers are lightweight ways of packaging and
isolating app workloads, Docker allows multiple workloads
to run on the same physical or virtual server without conflict
Businesses can consolidate datacenters, integrate IT from
mergers and acquisitions and enable portability to cloud
while reducing the footprint of operating systems and
servers to maintain
34. © 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.34
Hybrid Cloud
Docker guarantees apps are cloud enabled - ready
to move across private and public clouds with a
higher level of control and guarantee apps will
operate as designed
The Docker platform is infrastructure independent
and ensures everything the app needs to run is
packaged and transported together from one site to
another
Docker uniquely provides flexibility and choice for
businesses to adopt a single, multi or hybrid cloud
environment without conflict
35. © 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.35
How does this help you build better software?
• Stop wasting hours trying to setup developer environments
• Spin up new instances and make copies of production code to run locally
• With Docker, you can easily take copies of your live environment and run on any new
endpoint running Docker.
Accelerate Developer Onboarding
• The isolation capabilities of Docker containers free developers from the worries of using
“approved” language stacks and tooling
• Developers can use the best language and tools for their application service without
worrying about causing conflict issues
Empower Developer Creativity
• By packaging up the application with its configs and dependencies together and shipping
as a container, the application will always work as designed locally, on another machine,
in test or production
• No more worries about having to install the same configs into a different environment
Eliminate Environment Inconsistencies
Editor's Notes Virtual Machines
Each virtualized application includes not only the application - which may be only 10s of MB - and the necessary binaries and libraries, but also an entire guest operating system - which may weigh 10s of GB.
Docker
The Docker Engine container comprises just the application and its dependencies. It runs as an isolated process in userspace on the host operating system, sharing the kernel with other containers. Thus, it enjoys the resource isolation and allocation benefits of VMs but is much more portable and efficient.
Virtual Machines
Each virtualized application includes not only the application - which may be only 10s of MB - and the necessary binaries and libraries, but also an entire guest operating system - which may weigh 10s of GB.
Docker
The Docker Engine container comprises just the application and its dependencies. It runs as an isolated process in userspace on the host operating system, sharing the kernel with other containers. Thus, it enjoys the resource isolation and allocation benefits of VMs but is much more portable and efficient.
The modern application platform is built on Docker and containers. From developers to IT, Windows and Linux, on-premises to cloud, Docker is the unifying platform to modernize all apps from commercial off the shelf, homegrown traditional and microservices. Simply being Dockerized provides these apps the characteristics of being agile, safer, resilient, cloud enabled and cost optimized as they enter a modern software supply chain. Docker empowers digital transformation one app, service and stack at a time. - from the developer desktop to production.