You are on page 1of 18

Introduction to Docker

What is Docker?
Open-source
Automates deployment of applications inside software containers
Provides a layer of abstraction from the base technology (containers)
Lightweight containers
Union filesystem
Copy-on-write
Why Containers?
Why not?
Hardware virtualization is limited
Hypervisors consume 10-15% of host machine resources
Platform virtualization is limited
Maximizes tenancy and performance
Shares a single kernel
Unused resources will be re-allocated
Why Docker?
Encode dependencies and deployment practices into an image
For developers
Use the same image for development in production
Focus on development, not operations
For operations
Simplifies deployment process
Dependencies come built-in
No more well, it worked on my machine
Sub-second start time
How do you get started?

Demonstration
Monolithic vs Microservice Architecture
Monolithic
One cohesive unit of code
Components are designed to work together
Share the same memory space and resources
Pros
Easier to communicate with components
Can perform better
Cons
Tight coupling
Difficult to scale
Microservice
Lots of smaller, independent applications
Each runs in own memory space
Pros
Improved app organization
Can scale each service independently
Reduces code duplication
Cons
Migrating monolithic app can be difficult
Could become messy
Docker Architecture
The Basics
Containers should be ephemeral
Application shouldnt write user data to the container
Containers can be added or removed from a cluster without impacting the end user
Container == process
Only one foreground process should be running inside the container
Docker Images
Union file system
Dockerfile
Set of instructions
FROM
RUN
COPY
CMD
Image Cache
Networking - Before
Two network modes
Bridge
Host
Bridge mode required use of links
Modify /etc/hosts file to enable containers
to discover each other
Link limitations
No support for bi-directional links
Not persisted after container is re-created
Containers must be started in a specific order
Networking - Now
Container Network Model (CNM)
Plugin framework to extend networking capabilities
Vendors make their own plugins
Weave, Calico, VMWare, Cisco, Microsoft, etc.
Now containers can
Connect to each other across different physical or virtual hosts
Be easily stopped, started and restarted without disrupting the
connections to other containers
Be created in any order
Demo
Thank you
Questions?

@aytracloud
www.aytra.com
Scale your applications.
Manage your releases.
Bring your costs down.

Aytra takes the guesswork out of running containers in production

Learn more and get early access at www.aytra.com


Q&A Session
Credits
Monolithic/Microservice Image credit: https://dzone.com/articles/scalable-cloud-
computing-with-microservices

You might also like