Introduction To Docker: Ajeet Singh Raina Docker Captain - Docker, Inc
Introduction To Docker: Ajeet Singh Raina Docker Captain - Docker, Inc
2
Agenda
- A Shift from Monolithic to Microservices Architecture
- What is Docker? What problem does it solve for us?
- How Docker is different from VM & CM
- Using Docker: Build, Ship and Run WorkFlow
- Docker Ecosystem & Native Offering
- Docker Tools
- Demo
A Shift from Monolithic to
Microservice Architecture
Monolithic A Decade Ago (and still valid)
Ap - Apps were monolithic
Slow Changing - Built on a single stack such as .NET or Java
- Long Lived
- Deployed to a single server
Big Server
5
Customer/
Clients/ Users
Data
Today Storage
Data
Storage
Data
6 Storage
Once upon a time… A Software Stack
7
Now....much more distributed, complex..
8
9
10
An Effort to solve the problem complexity…
11
Every possible goods to ship X Every possible way to ship
12
A Solution…
13
Docker ~ Brings standardization on packaging goods
14
What is Docker?
Configuration Manager?
Virtualization Tool?
VM Manager?
15
Less Portable, Most Portable,
Minimal Overhead Lots of Overhead
Configuration Tools
16
Less Portable, Most Portable,
Minimal Overhead Lots of Overhead
Configuration Tools
17
Traditional Software Development Workflow
(Without Docker)
What is Docker?
A Company as well as Product
Developed by DotCloud Inc. ( Currently Docker Inc.)
A Framework they built their PaaS upon.
Released it as open source 4+ years back
Cross-platform nature and friendliness towards System Admin and Developers
• Developers - concentrate on building applications and getting them running
inside the containers
• System Admins - work on running the containers in deployment.
Possible to set up in any OS, be it Windows, OSX, Linux - It work the same way
Guaranteed to run the same way - Your development desktop, a bare-metal
server, virtual machine, data center, or cloud
28
What is Docker?
• A tool that can package an application and its dependencies in a virtual
container.
• Implementation of a container which is portable using a concept of image
• Docker uses host OS kernel, there is no custom or additional kernel inside
container. All containers runs on machine are sharing this "host" kernel.
• Docker uses resource isolation features of the Linux kernel such as cgroups and
kernel namespaces to allow independent "containers" to run within a single Linux
instance, avoiding the overhead of starting virtual machines.
29
What is Docker?
• Standardized packaging for
software and dependencies
• Isolate apps from each other
• Share the same OS kernel
• Works for all major Linux
distributions
• Containers native to Windows
Server 2016
30
Docker containers are NOT VMs
Docker containers are NOT VMs
• It’s not quite like a VM
• Uses the host kernel
• Can’t boot a different OS
• Can’t have its own modules
• Doesn’t need init as PID 1
• Doesn’t need syslogd, cron.
32
VM Vs Docker - Similarity
Virtual Machines Docker
Process in one VM can’t see processes in Process in one container can’t see
other VMs processes in other container
Each VM has its own root filesystem Each container has its own root file
system(Not Kernel)
Each VM gets its own virtual network Docker can get virtual network adapter. It
adapter can have separate IP and ports
VM is a running instance of physical Docker containers are running instances of
files(.VMX and .VMDK) Docker Image
Host OS can be different from guest OS Host OS can be different from Container
OS
33
VM Vs Docker - Difference
Virtual Machines Docker
Each VM runs its own OS All containers share the same Kernel of
the host
Boot up time is in minutes Containers instantiate in seconds
VMs snapshots are used sparingly Images are built incrementally on top of
another like layers. Lots of
images/snapshots
Not effective diffs. Not version controlled Images can be diffed and can be version
controlled. Dockerhub is like GITHUB
Cannot run more than couple of VMs on Can run many Docker containers in a
an average laptop laptop.
Only one VM can be started from one set Multiple Docker containers can be started
of VMX and VMDK files from one Docker image
34
VMs
35
Containers
36
Containers Vs VMs
37
Docker + Windows Server = Windows Containers
Docker Engine
Deep integration with 2+ years of
engineering collaboration in Docker
Windows Server 2016
Engine and Windows Server
Infrastructure
Microsoft is top 5 Docker open
source project contributor and a
Docker maintainer
They’re different, not mutually exclusive
39
Docker Vocabulary
Some Docker vocabulary
Docker Image
The basis of a Docker container. Represents a full application
Docker Container
The standard unit in which the application service resides and executes
Docker Engine
Creates, ships and runs Docker containers deployable on a physical or
virtual, host locally, in a datacenter or cloud service provider
45
Build, Ship & Run
Put it all together: Build, Ship, Run Workflow
Developers IT Operations
48
Docker on Linux Vs Windows
51
52
Dockerfile – Windows Example
Backend Service
Specify Volumes/Network
Environmental variables
Frontend Service
Specify Volumes/Network
Environmental variables
Demo
Docker Playground
References
www.collabnix.com
www.play-with-docker.com – Docker Playground ( For Test Drive)
www.docs.docker.com
Thank You.
Questions?