+ All Categories
Home > Technology > Launch It With Docker

Launch It With Docker

Date post: 13-Apr-2017
Category:
Upload: amal-dev
View: 115 times
Download: 1 times
Share this document with a friend
24
LAUNCH IT WITH DOCKER AMAL DEV
Transcript
Page 1: Launch It With Docker

LAUNCH IT WITH DOCKERAMAL DEV

Page 2: Launch It With Docker

ABOUT ME

Full stack web developer in Microsoft technology stack

10+ years of experienceMicrosoft MVPTechnical Analyst@ UST GlobalBlogger@ www.techrepository.inContact me @amaldevv

Page 3: Launch It With Docker

AGENDA

History01

VM vs Containers

02Docker Concepts

03Best Practices

04Use Cases

05Docker in the Cloud

06Live Demo

07

Page 4: Launch It With Docker

EARLY DAYS

Page 5: Launch It With Docker

EARLY DAYS

CostResource WastageDifficult to migrate or scaleVendor Lock-in

CONS

Page 6: Launch It With Docker

VIRTUALIZATION

Page 7: Launch It With Docker

VIRTUALIZATION

Optimal Resource UtilizationEasy to scale and maintainDowntime reduced significantly

No Vendor Lock-in

PROS

Page 8: Launch It With Docker

VIRTUALIZATION

It still needs CPU allocation, Storage and RAM

A guest OSAs no of VM’s increases, more resources is needed

CONS

Page 9: Launch It With Docker

CONTAINERS

Container based virtualization uses the kernel on the host's operating system to run multiple guest instances

Page 10: Launch It With Docker

CONTAINERS

Page 11: Launch It With Docker

COMPARISON

CONTAINER VM

Page 12: Launch It With Docker

WHAT IS DOCKER ?

Docker is an open-source engine that automates the deployment of any application as a lightweight, portable, self-sufficient container that will run virtually anywhere.

Source : docker.io

Page 13: Launch It With Docker

WHAT DOCKER PROVIDES ?

Encapsulate applications into Docker Containers

Distribute and Ship those containers

Deploy these in a data center or cloud

Page 14: Launch It With Docker

ARCHITECTURE

Page 15: Launch It With Docker

IMAGES & CONTAINERS

IMAGES

Immutable file Snapshot of the

container Stored in Docker

Hub/Private Registry

CONTAINERS

Based on images Contains everything

needed to run the application

Isolated application platform

Page 16: Launch It With Docker

DOCKER COMMANDS

docker –version

docker –info

docker images

docker ps

docker build

docker run

docker login

docker search

docker pull

docker push

docker tag

Page 17: Launch It With Docker

DOCKER_HOST

Images Cache

Containers

RegistryClient

Docker pull Docker daemon

Docker run

DotNetDotNet

DotNet

DotNet

WORKFLOW

Page 18: Launch It With Docker

Registry DOCKER_HOST

Images

Containers

0001Program.cs110HelloWorld.dll111010111011011010

Code/Binaries

Client

Docker build

Docker daemonFROM microsoft/dotnet:runtimeWORKDIR /appCOPY /app /appENTRYPOINT dotnet HelloWorld.dll

dockerfile

Private Registry

Docker run

Docker push

Docker build

Page 19: Launch It With Docker

docker composePrivate Registry

MultiService

API

MultiService

DOCKER_HOST

Images

Containers

Registry

Client

Docker-compose

Docker daemon

version: '2'services: multiservice: image: - multiservice:latest environment: - CustomerAPIService=http://webapi/api/Customer ports: - "80:80" depends_on: - webapi webapi: image: - multiserviceapi:latest

Docker-compose.yml

DotNet

MultiService

MultiService

APIfrontend

api

MultiService

MultiService

API

Page 20: Launch It With Docker

BEST PRACTICES

Don’t store data inside containers Don’t deploy applications into running containers Avoid creating larger images Try to avoid creating single layer images Avoid creating images from running containers Avoid hard coding of IP Addresses Don’t store credentials in the image Avoid running more than one process inside the

container Exclude files using .dockerignore file Avoid installing unnecessary packages

Page 21: Launch It With Docker

USE CASES Microservices CI/CD Multi-tenant Applications App Isolation

Page 22: Launch It With Docker

DOCKER IN THE CLOUD

Docker Cloud dotCloud Azure Container Service AWS

Page 23: Launch It With Docker

QUESTIONS

Page 24: Launch It With Docker

THANK YOU


Recommended