Date post: | 13-Apr-2017 |
Category: |
Technology |
Upload: | amal-dev |
View: | 115 times |
Download: | 1 times |
LAUNCH IT WITH DOCKERAMAL DEV
ABOUT ME
Full stack web developer in Microsoft technology stack
10+ years of experienceMicrosoft MVPTechnical Analyst@ UST GlobalBlogger@ www.techrepository.inContact me @amaldevv
AGENDA
History01
VM vs Containers
02Docker Concepts
03Best Practices
04Use Cases
05Docker in the Cloud
06Live Demo
07
EARLY DAYS
EARLY DAYS
CostResource WastageDifficult to migrate or scaleVendor Lock-in
CONS
VIRTUALIZATION
VIRTUALIZATION
Optimal Resource UtilizationEasy to scale and maintainDowntime reduced significantly
No Vendor Lock-in
PROS
VIRTUALIZATION
It still needs CPU allocation, Storage and RAM
A guest OSAs no of VM’s increases, more resources is needed
CONS
CONTAINERS
Container based virtualization uses the kernel on the host's operating system to run multiple guest instances
CONTAINERS
COMPARISON
CONTAINER VM
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
WHAT DOCKER PROVIDES ?
Encapsulate applications into Docker Containers
Distribute and Ship those containers
Deploy these in a data center or cloud
ARCHITECTURE
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
DOCKER COMMANDS
docker –version
docker –info
docker images
docker ps
docker build
docker run
docker login
docker search
docker pull
docker push
docker tag
DOCKER_HOST
Images Cache
Containers
RegistryClient
Docker pull Docker daemon
Docker run
DotNetDotNet
DotNet
DotNet
WORKFLOW
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
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
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
USE CASES Microservices CI/CD Multi-tenant Applications App Isolation
DOCKER IN THE CLOUD
Docker Cloud dotCloud Azure Container Service AWS
QUESTIONS
THANK YOU