SlideShare uma empresa Scribd logo
1 de 62
www.tothenew.com
Dockerize it all
www.tothenew.com
About Me
Puneet Behl
Associate Technical Lead
TO THE NEW Digital
puneet.behl@tothenew.com
GitHub: https://github.com/puneetbehl/
Twitter: @puneetbhl
LinkedIn: https://in.linkedin.com/in/puneetbhl
www.tothenew.com
Agenda
● Understanding the problem of shipping code
● The solution
● What is Docker Container?
● Benefits of Docker
● Understanding Docker components & architecture.
● Installation
● Hello world demo
● Running Stack of services using Docker Compose
● Moving to Production
www.tothenew.com
Agenda
● Understanding the problem of shipping code
● The solution
● What is Docker Container?
● Benefits of Docker
● Understanding Docker components & architecture.
● Installation
● Hello world demo
● Running Stack of services using Docker Compose
● Moving to Production
www.tothenew.com
Let’s see how things can get complicated with shipping code??
www.tothenew.com
A simple web application with one developer
A Developer
www.tothenew.com
Added more developers to team
Multiple Developers
www.tothenew.com
Setup QA & Production Environment
Multiple Developers
QA Server
Public Cloud
Production Clusters
www.tothenew.com
Created Background Workers
Multiple Developers
QA Server
Public Cloud
Production Clusters
www.tothenew.com
Refactored, Microservice Architecture
Multiple Developers
QA Server
Public Cloud
Production Clusters
www.tothenew.com
● “Works on my machine” syndrome
● Hard disk crashed -> New Setup -> Nothing Works :(
● Adding new Developer in the team
● Going live? Please DO NOT break on production.
● Dependency Hell - Common dependency with different versions
In Nutshell, what are the challenges?
www.tothenew.com
Contents
● Understanding the problem of shipping code
● The solution
● What is Docker Container?
● Understanding Docker components & architecture.
● Installation
● Hello World demo
● Running Stack of services using Docker Compose
● Moving to Production
www.tothenew.com
The Solution
Multiple Developers
QA Server
Public Cloud
Production Clusters
www.tothenew.com
The Solution, Contd...
Multiple Developers
QA Server
Public Cloud
Production Clusters
www.tothenew.com
Contents
● Understanding the problem of shipping code
● The solution
● What is Docker Container?
● Benefits of Docker
● Understanding Docker components & architecture.
● Installation
● Hello World demo
● Running Stack of services using Docker Compose
● Moving to Production
www.tothenew.com
A Docker Container allows application
developer to package up their application with
all it’s dependencies they are associated with.
What is Docker Container?
www.tothenew.com
Okay! I understand Docker Containers now, they are like VM???
www.tothenew.com
Okay! I understand Docker Containers now, they are like VM???
www.tothenew.com
Hmmm…
www.tothenew.com
Let’s see what is the difference between application running on
VM v/s Docker?
www.tothenew.com
Application Running On VM v/s Container
www.tothenew.com
Application Running On Docker Container
www.tothenew.com
Application Running On VM v/s Container
www.tothenew.com
Contents
● Understanding the problem of shipping code
● The solution
● What is Docker Container?
● Benefits of Docker
● Understanding Docker components & architecture.
● Installation
● Hello World demo
● Running Stack of services using Docker Compose
● Moving to Production
www.tothenew.com
● Scalability - The containers are extremely lightweight so scaling up
and scaling down is very easy.
Benefits of using Docker
www.tothenew.com
● Scalability - The containers are extremely lightweight so scaling up
and scaling down is very easy.
● Portability - just pull the image and start container.
Benefits of using Docker
www.tothenew.com
● Scalability - The containers are extremely lightweight so scaling up
and scaling down is very easy.
● Portability - just pull the image and start container.
● Deployment - because containers can run almost anywhere we can
deploy to Desktop, Physical Server, Virtual Machine, Public/Private
Cloud etc.
Benefits of using Docker
www.tothenew.com
● Scalability - The containers are extremely lightweight so scaling up
and scaling down is very easy.
● Portability - just pull the image and start container.
● Deployment - because containers can run almost anywhere we can
deploy to Desktop, Physical Server, Virtual Machine, Public/Private
Cloud etc.
● Efficient Resource Utilization - Multiple isolated containers sharing
resources.
Benefits of using Docker
www.tothenew.com
Why Developers Care?
www.tothenew.com
● Build any application in any language using any stack.
● Dockerize application can run anywhere on anything.
● No longer need to cross our fingers when we deploy to production
● Helps improving application design
Why Developers Care?
www.tothenew.com
Why Devops Care?
www.tothenew.com
● Easy migrations to different infrastructure
● Replication of different environments is very easy.
● Fix an issue once, it’s fixed everywhere
● Less conflicts with developers, because of same environment.
Why Devops Care?
www.tothenew.com
Why Business Care?
www.tothenew.com
● Boost Productivity
Why Business Care?
www.tothenew.com
● Boost Productivity
● Reduce Risk
Why Business Care?
www.tothenew.com
● Boost Productivity
● Reduce Risk
● Reduce Cost
Why Business Care?
www.tothenew.com
Contents
● Understanding the problem of shipping code
● The solution
● What is Docker Container?
● Benefits of Docker
● Understanding Docker components & architecture.
● Installation
● Hello World demo...
● Running Stack of services using Docker Compose
● Moving to Production
www.tothenew.com
Docker Core Components
● Docker Daemon
www.tothenew.com
Docker Core Components
● Docker Daemon
The Docker daemon runs on a host
machine. The user does not directly
interact with the daemon, but instead
through the Docker client.
www.tothenew.com
Docker Core Components
● Docker Daemon
● Docker Client
www.tothenew.com
Docker Core Components
● Docker Daemon
● Docker Client
The Docker client, in the form of the
docker binary, is the primary user
interface to Docker. It accepts
commands from the user and
communicates back and forth with a
Docker daemon.
www.tothenew.com
Docker Workflow Components
www.tothenew.com
Docker Workflow Components
● Docker Image
A Docker image is a read-only
template to build Docker Containers
www.tothenew.com
Docker Workflow Components
● Docker Image
A Docker image is a read-only
template to build Docker Containers
● Docker Registries
Docker registries hold images. These
are public or private stores from
where you upload or download
images.
www.tothenew.com
Docker Workflow Components
● Docker Image
A Docker image is a read-only
template to build Docker Containers
● Docker Container
Created from images. start, stop, run
● Docker Registries
Docker registries hold images. These
are public or private stores from
where you upload or download
images.
www.tothenew.com
Docker Architecture
www.tothenew.com
Contents
● Understanding the problem of shipping code
● The solution
● What is Docker Container?
● Benefits of Docker
● Understanding Docker components & architecture.
● Installation
● Hello World demo
● Running Stack of services using Docker Compose
● Moving to Production
www.tothenew.com
Installation
● Linux
Follow steps for your version of linux
https://docs.docker.com/engine/installation/
apt-get install docker-engine
yum install docker-engine
● Mac or Windows OS
Use docker toolbox isntaller : https://www.docker.com/docker-
toolbox
www.tothenew.com
Installations : Docker toolbox
www.tothenew.com
Contents
● Understanding the problem of shipping code
● The solution
● What is Docker Container?
● Benefits of Docker
● Understanding Docker components & architecture.
● Installation
● Hello world demo
● Running Stack of services using Docker Compose
● Moving to Production
www.tothenew.com
A Spring Boot application
$ ( spring jar hello.jar hello.groovy ) && ( java -jar hello.jar )
www.tothenew.com
Build Image Using Dockerfile
FROM java:8
MAINTAINER Puneet Behl "puneet.behl@tothenew.com"
ADD hello.jar /app/hello.jar
EXPOSE 8080
CMD ["java", "-jar", "/app/hello.jar"]
www.tothenew.com
Build Docker image and push to Docker Hub
www.tothenew.com
Contents
● Understanding the problem of shipping code
● The solution
● What is Docker Container?
● Benefits of Docker
● Understanding Docker components & architecture.
● Installation
● Hello world demo
● Running stack of services using Docker compose
● Moving to Production
www.tothenew.com
A Complicated application architecture
www.tothenew.com
Docker Compose
frontend:
image: pbehl/frontend
ports:
- "3000:3000"
links:
- backend
environment:
backendServerUrl: "http://backend:8080"
command: "node server.js"
mongodb:
image: mongo
backend:
image: pbehl/backend
links:
- mongodb
environment:
"spring.data.mongodb.host": "mongodb"
"logging.level.org.springframework.web": "DEBUG"
ports:
- "8080:8080"
www.tothenew.com
Build using Docker Compose
www.tothenew.com
Contents
● Understand the problem
● The solution
● What is Docker Container?
● Benefits of Docker
● Understanding Docker components & architecture.
● Installation
● Hello world demo
● Running Stack of services using Docker Compose
● Moving to Production
www.tothenew.com
Orchestration tools needed for docker cluster environment
● Provision servers
● Deploy
● Manage servers
Some of the available orchestration tools
● Docker swarm
● Centurion
● Amazon EC2 container service
Moving to Production
www.tothenew.com
Questions???
www.tothenew.com
Thank you
www.tothenew.com
Sample Demo: https://github.com/puneetbehl/gr8conf-docker-demo
Docker documentation: https://docs.docker.com
Docker tool-box https://www.docker.com/docker-toolbox
Docker hub: https://hub.docker.com/
Docker up and running from O'Reilly publication Authors: Karl Matthias & Sean P. Kane
Union file system : https://en.wikipedia.org/wiki/UnionFS
http://stackoverflow.com/questions/16047306/how-is-docker-different-from-a-normal-virtual-
machine
Build and push images to docker hub https://youtu.be/QCEWQs6LwAk
Docker-compose https://youtu.be/kn_dUA6f29I
References

Mais conteúdo relacionado

Mais procurados

Docs or it didn’t happen
Docs or it didn’t happenDocs or it didn’t happen
Docs or it didn’t happenAll Things Open
 
WTF is GitOps and Why You Should Care?
WTF is GitOps and Why You Should Care?WTF is GitOps and Why You Should Care?
WTF is GitOps and Why You Should Care?Weaveworks
 
Setting up Notifications, Alerts & Webhooks with Flux v2 by Alison Dowdney
Setting up Notifications, Alerts & Webhooks with Flux v2 by Alison DowdneySetting up Notifications, Alerts & Webhooks with Flux v2 by Alison Dowdney
Setting up Notifications, Alerts & Webhooks with Flux v2 by Alison DowdneyWeaveworks
 
Groovy in the Cloud
Groovy in the CloudGroovy in the Cloud
Groovy in the CloudDaniel Woods
 
はじめての JFrog Artifactory
はじめての JFrog Artifactoryはじめての JFrog Artifactory
はじめての JFrog ArtifactoryTsuyoshi Miyake
 
Gerrit JavaScript Plugins
Gerrit JavaScript PluginsGerrit JavaScript Plugins
Gerrit JavaScript PluginsDariusz Łuksza
 
GitOps Days EU 20 - Our journey building a self-service platform
GitOps Days EU 20 - Our journey building a self-service platformGitOps Days EU 20 - Our journey building a self-service platform
GitOps Days EU 20 - Our journey building a self-service platformSteven Wade Consutling
 
Ratpack Web Framework
Ratpack Web FrameworkRatpack Web Framework
Ratpack Web FrameworkDaniel Woods
 
Writing Commits for You, Your Friends, and Your Future Self
Writing Commits for You, Your Friends, and Your Future SelfWriting Commits for You, Your Friends, and Your Future Self
Writing Commits for You, Your Friends, and Your Future SelfAll Things Open
 
Drupal 8 and 9, Backwards Compatibility, and Drupal 8.5 update
Drupal 8 and 9, Backwards Compatibility, and Drupal 8.5 updateDrupal 8 and 9, Backwards Compatibility, and Drupal 8.5 update
Drupal 8 and 9, Backwards Compatibility, and Drupal 8.5 updateAngela Byron
 
Your own full blown Gerrit plugin
Your own full blown Gerrit pluginYour own full blown Gerrit plugin
Your own full blown Gerrit pluginDariusz Łuksza
 
Gradle - time for a new build
Gradle - time for a new buildGradle - time for a new build
Gradle - time for a new buildIgor Khotin
 
Android gradle-build-system-overview
Android gradle-build-system-overviewAndroid gradle-build-system-overview
Android gradle-build-system-overviewKevin He
 
GitOps Toolkit (Cloud Native Nordics Tech Talk)
GitOps Toolkit (Cloud Native Nordics Tech Talk)GitOps Toolkit (Cloud Native Nordics Tech Talk)
GitOps Toolkit (Cloud Native Nordics Tech Talk)Weaveworks
 
PuppetConf 2016: Using Puppet with Kubernetes and OpenShift – Diane Mueller, ...
PuppetConf 2016: Using Puppet with Kubernetes and OpenShift – Diane Mueller, ...PuppetConf 2016: Using Puppet with Kubernetes and OpenShift – Diane Mueller, ...
PuppetConf 2016: Using Puppet with Kubernetes and OpenShift – Diane Mueller, ...Puppet
 
Hybrid and Multi-Cloud Strategies for Kubernetes with GitOps
Hybrid and Multi-Cloud Strategies for Kubernetes with GitOpsHybrid and Multi-Cloud Strategies for Kubernetes with GitOps
Hybrid and Multi-Cloud Strategies for Kubernetes with GitOpsSonja Schweigert
 
Building Grails Plugins - Tips And Tricks
Building Grails Plugins - Tips And TricksBuilding Grails Plugins - Tips And Tricks
Building Grails Plugins - Tips And TricksMike Hugo
 

Mais procurados (20)

Docs or it didn’t happen
Docs or it didn’t happenDocs or it didn’t happen
Docs or it didn’t happen
 
WTF is GitOps and Why You Should Care?
WTF is GitOps and Why You Should Care?WTF is GitOps and Why You Should Care?
WTF is GitOps and Why You Should Care?
 
Setting up Notifications, Alerts & Webhooks with Flux v2 by Alison Dowdney
Setting up Notifications, Alerts & Webhooks with Flux v2 by Alison DowdneySetting up Notifications, Alerts & Webhooks with Flux v2 by Alison Dowdney
Setting up Notifications, Alerts & Webhooks with Flux v2 by Alison Dowdney
 
Groovy in the Cloud
Groovy in the CloudGroovy in the Cloud
Groovy in the Cloud
 
はじめての JFrog Artifactory
はじめての JFrog Artifactoryはじめての JFrog Artifactory
はじめての JFrog Artifactory
 
Gerrit JavaScript Plugins
Gerrit JavaScript PluginsGerrit JavaScript Plugins
Gerrit JavaScript Plugins
 
Gradle Introduction
Gradle IntroductionGradle Introduction
Gradle Introduction
 
Gradle how to's
Gradle how to'sGradle how to's
Gradle how to's
 
Gitops Hands On
Gitops Hands OnGitops Hands On
Gitops Hands On
 
GitOps Days EU 20 - Our journey building a self-service platform
GitOps Days EU 20 - Our journey building a self-service platformGitOps Days EU 20 - Our journey building a self-service platform
GitOps Days EU 20 - Our journey building a self-service platform
 
Ratpack Web Framework
Ratpack Web FrameworkRatpack Web Framework
Ratpack Web Framework
 
Writing Commits for You, Your Friends, and Your Future Self
Writing Commits for You, Your Friends, and Your Future SelfWriting Commits for You, Your Friends, and Your Future Self
Writing Commits for You, Your Friends, and Your Future Self
 
Drupal 8 and 9, Backwards Compatibility, and Drupal 8.5 update
Drupal 8 and 9, Backwards Compatibility, and Drupal 8.5 updateDrupal 8 and 9, Backwards Compatibility, and Drupal 8.5 update
Drupal 8 and 9, Backwards Compatibility, and Drupal 8.5 update
 
Your own full blown Gerrit plugin
Your own full blown Gerrit pluginYour own full blown Gerrit plugin
Your own full blown Gerrit plugin
 
Gradle - time for a new build
Gradle - time for a new buildGradle - time for a new build
Gradle - time for a new build
 
Android gradle-build-system-overview
Android gradle-build-system-overviewAndroid gradle-build-system-overview
Android gradle-build-system-overview
 
GitOps Toolkit (Cloud Native Nordics Tech Talk)
GitOps Toolkit (Cloud Native Nordics Tech Talk)GitOps Toolkit (Cloud Native Nordics Tech Talk)
GitOps Toolkit (Cloud Native Nordics Tech Talk)
 
PuppetConf 2016: Using Puppet with Kubernetes and OpenShift – Diane Mueller, ...
PuppetConf 2016: Using Puppet with Kubernetes and OpenShift – Diane Mueller, ...PuppetConf 2016: Using Puppet with Kubernetes and OpenShift – Diane Mueller, ...
PuppetConf 2016: Using Puppet with Kubernetes and OpenShift – Diane Mueller, ...
 
Hybrid and Multi-Cloud Strategies for Kubernetes with GitOps
Hybrid and Multi-Cloud Strategies for Kubernetes with GitOpsHybrid and Multi-Cloud Strategies for Kubernetes with GitOps
Hybrid and Multi-Cloud Strategies for Kubernetes with GitOps
 
Building Grails Plugins - Tips And Tricks
Building Grails Plugins - Tips And TricksBuilding Grails Plugins - Tips And Tricks
Building Grails Plugins - Tips And Tricks
 

Destaque

Mule soft esb – data validation best practices
Mule soft esb – data validation best practicesMule soft esb – data validation best practices
Mule soft esb – data validation best practicesalfa
 
Dockerized tests with dockerized jenkins
Dockerized tests with dockerized jenkinsDockerized tests with dockerized jenkins
Dockerized tests with dockerized jenkinsFernando Valverde
 
Docker Demystified - Virtual VMs without the Fat
Docker Demystified - Virtual VMs without the FatDocker Demystified - Virtual VMs without the Fat
Docker Demystified - Virtual VMs without the FatErik Osterman
 
Integration Testing with Docker Containers with DockerCompose
Integration Testing with Docker Containers  with DockerComposeIntegration Testing with Docker Containers  with DockerCompose
Integration Testing with Docker Containers with DockerComposeMike Holdsworth
 
How to Dockerize Web Application using Docker Compose
How to Dockerize Web Application using Docker ComposeHow to Dockerize Web Application using Docker Compose
How to Dockerize Web Application using Docker ComposeEvoke Technologies
 
Working with kubernetes
Working with kubernetesWorking with kubernetes
Working with kubernetesNagaraj Shenoy
 
DEPLOYING A DOCKERIZED DISTRIBUTED APPLICATION IN MESOS
DEPLOYING A DOCKERIZED DISTRIBUTED APPLICATION IN MESOSDEPLOYING A DOCKERIZED DISTRIBUTED APPLICATION IN MESOS
DEPLOYING A DOCKERIZED DISTRIBUTED APPLICATION IN MESOSJulia Mateo
 
SDLC Using Docker for Fun and Profit
SDLC Using Docker for Fun and ProfitSDLC Using Docker for Fun and Profit
SDLC Using Docker for Fun and Profitdantheelder
 
Docker from basics to orchestration (PHPConfBr2015)
Docker from basics to orchestration (PHPConfBr2015)Docker from basics to orchestration (PHPConfBr2015)
Docker from basics to orchestration (PHPConfBr2015)Wellington Silva
 
Monitoring docker container and dockerized applications
Monitoring docker container and dockerized applicationsMonitoring docker container and dockerized applications
Monitoring docker container and dockerized applicationsAnanth Padmanabhan
 
Docker Practical Use Cases
Docker Practical Use CasesDocker Practical Use Cases
Docker Practical Use CasesAlexei Yuzhakov
 
Dockerize WordPress on Mac/Windows
Dockerize WordPress on Mac/WindowsDockerize WordPress on Mac/Windows
Dockerize WordPress on Mac/WindowsKite Koga
 
Modern DevOps with Docker
Modern DevOps with DockerModern DevOps with Docker
Modern DevOps with DockerShippable
 
I tried to dockerize my app but I had to PaaS
I tried to dockerize my app but I had to PaaSI tried to dockerize my app but I had to PaaS
I tried to dockerize my app but I had to PaaSJorge Morales
 
Docker containers
Docker containersDocker containers
Docker containersPau López
 
How Docker Fits into DevOps Ecosystem
How Docker Fits into DevOps EcosystemHow Docker Fits into DevOps Ecosystem
How Docker Fits into DevOps EcosystemEdureka!
 
Docker Overview - Rise of the Containers
Docker Overview - Rise of the ContainersDocker Overview - Rise of the Containers
Docker Overview - Rise of the ContainersRyan Hodgin
 

Destaque (20)

Mule soft esb – data validation best practices
Mule soft esb – data validation best practicesMule soft esb – data validation best practices
Mule soft esb – data validation best practices
 
Dockerized tests with dockerized jenkins
Dockerized tests with dockerized jenkinsDockerized tests with dockerized jenkins
Dockerized tests with dockerized jenkins
 
Docker Demystified - Virtual VMs without the Fat
Docker Demystified - Virtual VMs without the FatDocker Demystified - Virtual VMs without the Fat
Docker Demystified - Virtual VMs without the Fat
 
Integration Testing with Docker Containers with DockerCompose
Integration Testing with Docker Containers  with DockerComposeIntegration Testing with Docker Containers  with DockerCompose
Integration Testing with Docker Containers with DockerCompose
 
How to Dockerize Web Application using Docker Compose
How to Dockerize Web Application using Docker ComposeHow to Dockerize Web Application using Docker Compose
How to Dockerize Web Application using Docker Compose
 
Working with kubernetes
Working with kubernetesWorking with kubernetes
Working with kubernetes
 
DEPLOYING A DOCKERIZED DISTRIBUTED APPLICATION IN MESOS
DEPLOYING A DOCKERIZED DISTRIBUTED APPLICATION IN MESOSDEPLOYING A DOCKERIZED DISTRIBUTED APPLICATION IN MESOS
DEPLOYING A DOCKERIZED DISTRIBUTED APPLICATION IN MESOS
 
SDLC Using Docker for Fun and Profit
SDLC Using Docker for Fun and ProfitSDLC Using Docker for Fun and Profit
SDLC Using Docker for Fun and Profit
 
Docker from basics to orchestration (PHPConfBr2015)
Docker from basics to orchestration (PHPConfBr2015)Docker from basics to orchestration (PHPConfBr2015)
Docker from basics to orchestration (PHPConfBr2015)
 
Monitoring docker container and dockerized applications
Monitoring docker container and dockerized applicationsMonitoring docker container and dockerized applications
Monitoring docker container and dockerized applications
 
Docker Practical Use Cases
Docker Practical Use CasesDocker Practical Use Cases
Docker Practical Use Cases
 
Dockerize All The Things
Dockerize All The ThingsDockerize All The Things
Dockerize All The Things
 
Dockerize WordPress on Mac/Windows
Dockerize WordPress on Mac/WindowsDockerize WordPress on Mac/Windows
Dockerize WordPress on Mac/Windows
 
Modern DevOps with Docker
Modern DevOps with DockerModern DevOps with Docker
Modern DevOps with Docker
 
I tried to dockerize my app but I had to PaaS
I tried to dockerize my app but I had to PaaSI tried to dockerize my app but I had to PaaS
I tried to dockerize my app but I had to PaaS
 
Docker containers
Docker containersDocker containers
Docker containers
 
Kubernetes Basics
Kubernetes BasicsKubernetes Basics
Kubernetes Basics
 
Docker Intro
Docker IntroDocker Intro
Docker Intro
 
How Docker Fits into DevOps Ecosystem
How Docker Fits into DevOps EcosystemHow Docker Fits into DevOps Ecosystem
How Docker Fits into DevOps Ecosystem
 
Docker Overview - Rise of the Containers
Docker Overview - Rise of the ContainersDocker Overview - Rise of the Containers
Docker Overview - Rise of the Containers
 

Semelhante a Dockerize it all

Adventures in docker compose
Adventures in docker composeAdventures in docker compose
Adventures in docker composeLinkMe Srl
 
Docker in everyday development
Docker in everyday developmentDocker in everyday development
Docker in everyday developmentJustyna Ilczuk
 
20170321 docker with Visual Studio 2017
20170321 docker with Visual Studio 201720170321 docker with Visual Studio 2017
20170321 docker with Visual Studio 2017Takayoshi Tanaka
 
Docker 101 - Getting started
Docker 101 - Getting startedDocker 101 - Getting started
Docker 101 - Getting startedMatheus Marabesi
 
DevAssistant, Docker and You
DevAssistant, Docker and YouDevAssistant, Docker and You
DevAssistant, Docker and YouBalaBit
 
Multi-stage Docker builds to make building easy!
Multi-stage Docker builds to make building easy!Multi-stage Docker builds to make building easy!
Multi-stage Docker builds to make building easy!Milindu Sanoj Kumarage
 
eXoer on the grill: eXo Add-ons factory using Docker and Codenvy
eXoer on the grill: eXo Add-ons factory using Docker and CodenvyeXoer on the grill: eXo Add-ons factory using Docker and Codenvy
eXoer on the grill: eXo Add-ons factory using Docker and CodenvyeXo Platform
 
Docker All The Things - ASP.NET 4.x and Windows Server Containers
Docker All The Things - ASP.NET 4.x and Windows Server ContainersDocker All The Things - ASP.NET 4.x and Windows Server Containers
Docker All The Things - ASP.NET 4.x and Windows Server ContainersAnthony Chu
 
Improve your Java Environment with Docker
Improve your Java Environment with DockerImprove your Java Environment with Docker
Improve your Java Environment with DockerHanoiJUG
 
[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101Naukri.com
 
Introduction to Docker - Vellore Institute of Technology
Introduction to Docker - Vellore Institute of TechnologyIntroduction to Docker - Vellore Institute of Technology
Introduction to Docker - Vellore Institute of TechnologyAjeet Singh Raina
 
Domino on docker version 2
Domino on docker version 2Domino on docker version 2
Domino on docker version 2Slobodan Lohja
 
Introduction to Docker and Linux Containers @ Cloud Computing Rhein Main
Introduction to Docker and Linux Containers @ Cloud Computing Rhein MainIntroduction to Docker and Linux Containers @ Cloud Computing Rhein Main
Introduction to Docker and Linux Containers @ Cloud Computing Rhein MainPuja Abbassi
 

Semelhante a Dockerize it all (20)

Adventures in docker compose
Adventures in docker composeAdventures in docker compose
Adventures in docker compose
 
Docker basic
Docker basicDocker basic
Docker basic
 
Docker workshop GDSC_CSSC
Docker workshop GDSC_CSSCDocker workshop GDSC_CSSC
Docker workshop GDSC_CSSC
 
Docker for dev
Docker for devDocker for dev
Docker for dev
 
Docker in everyday development
Docker in everyday developmentDocker in everyday development
Docker in everyday development
 
20170321 docker with Visual Studio 2017
20170321 docker with Visual Studio 201720170321 docker with Visual Studio 2017
20170321 docker with Visual Studio 2017
 
Docker 101 - Getting started
Docker 101 - Getting startedDocker 101 - Getting started
Docker 101 - Getting started
 
DevAssistant, Docker and You
DevAssistant, Docker and YouDevAssistant, Docker and You
DevAssistant, Docker and You
 
Multi-stage Docker builds to make building easy!
Multi-stage Docker builds to make building easy!Multi-stage Docker builds to make building easy!
Multi-stage Docker builds to make building easy!
 
Demystifying Docker101
Demystifying Docker101Demystifying Docker101
Demystifying Docker101
 
Demystifying Docker
Demystifying DockerDemystifying Docker
Demystifying Docker
 
eXoer on the grill: eXo Add-ons factory using Docker and Codenvy
eXoer on the grill: eXo Add-ons factory using Docker and CodenvyeXoer on the grill: eXo Add-ons factory using Docker and Codenvy
eXoer on the grill: eXo Add-ons factory using Docker and Codenvy
 
Docker All The Things - ASP.NET 4.x and Windows Server Containers
Docker All The Things - ASP.NET 4.x and Windows Server ContainersDocker All The Things - ASP.NET 4.x and Windows Server Containers
Docker All The Things - ASP.NET 4.x and Windows Server Containers
 
Run automated tests in Docker
Run automated tests in DockerRun automated tests in Docker
Run automated tests in Docker
 
Improve your Java Environment with Docker
Improve your Java Environment with DockerImprove your Java Environment with Docker
Improve your Java Environment with Docker
 
[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101
 
Introduction to Docker - Vellore Institute of Technology
Introduction to Docker - Vellore Institute of TechnologyIntroduction to Docker - Vellore Institute of Technology
Introduction to Docker - Vellore Institute of Technology
 
DOCKER-PIAIC-SLIDES
DOCKER-PIAIC-SLIDESDOCKER-PIAIC-SLIDES
DOCKER-PIAIC-SLIDES
 
Domino on docker version 2
Domino on docker version 2Domino on docker version 2
Domino on docker version 2
 
Introduction to Docker and Linux Containers @ Cloud Computing Rhein Main
Introduction to Docker and Linux Containers @ Cloud Computing Rhein MainIntroduction to Docker and Linux Containers @ Cloud Computing Rhein Main
Introduction to Docker and Linux Containers @ Cloud Computing Rhein Main
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 

Último (20)

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 

Dockerize it all

Notas do Editor

  1. Let’s build the build the story, and start from the very ground of application.
  2. In this step, we have added more developers which means we need to set-up runtimes on each machine with a very specific version and make sure that application is running. Talk about that going forward
  3. Please note that we need an extra Proxy Server (Apache) in case of production and other environments. As we need to set-up multiple environments I need to: As DevOps, need to set-up everywhere again and again. if installed wrong version, need to fix it everywhere Set-up a new environment on completely different infrastructure. Manually repeat. Make sure/test that my application is working on all the environments every time I am going to deploy a new version. Talk about how things are getting complex, what
  4. Continue the story that now we break the application into one web application and multiple background workers so that if something breaks on one of the background workers it SHOULD NOT impact my application to which users are interacting. But the problem it introduces is that now I need to test all applications on each machine where I am going to run. I need to update deployment process on all of the servers. Talk about current solution to this problem without Docker
  5. Continue the story, that we decide to break application services into separate applications and create different services for different purposes. So now, we need multiple runtimes in order to run the application, more libraries, more complexities, more challenges, like Dependency Hell? and making sure that everything runs on every machine. everything runs on every environment Adding a new person to the team. Problem like “Works on my machine” Challenges with deploying over multiple different infrastructure. Build > Deploy > Run getting more and more complex.
  6. This slide is like a review of all the challenges we discussed in the earlier flow.
  7. Docker is an engine that enables any payload to be encapsulated as lightweight, portable, self sufficient container. can be manipulated using standard operations and run consistently on virtually any environment.
  8. Explain how every service will run in an isolated environment.
  9. Heavyweight Images Image Layering
  10. Heavyweight Images Image Layering
  11. Heavyweight Images Image Layering
  12. Scalability Let’s say have a web application and all of sudden I get lot of users, so it’s Portability Move to new Machine Let’s say I want to move my current set-up to a new machine, to a Cloud, to Physical network etc. Deployment Less risk while deploying to different env Rollback - installed an application over server apart from code changes, so now I need to Rollback Efficient Resource Utilization
  13. Scalability Let’s say have a web application and all of sudden I get lot of users, so it’s Portability Move to new Machine Let’s say I want to move my current set-up to a new machine, to a Cloud, to Physical network etc. Deployment Less risk while deploying to different env Rollback - installed an application over server apart from code changes, so now I need to Rollback Efficient Resource Utilization
  14. Scalability Let’s say have a web application and all of sudden I get lot of users, so it’s Portability Move to new Machine Let’s say I want to move my current set-up to a new machine, to a Cloud, to Physical network etc. Deployment Less risk while deploying to different env Rollback - installed an application over server apart from code changes, so now I need to Rollback Efficient Resource Utilization
  15. Scalability Let’s say have a web application and all of sudden I get lot of users, so it’s Portability Move to new Machine Let’s say I want to move my current set-up to a new machine, to a Cloud, to Physical network etc. Deployment Less risk while deploying to different env Rollback - installed an application over server apart from code changes, so now I need to Rollback Efficient Resource Utilization
  16. The technology is particularly appealing for developers because it is now easier than ever to make sure you develop, test and deploy using the same environment as your colleagues, resulting in less issues caused by differences or missing libraries. Docker also offers developers the flexibility to quickly run their apps anywhere, whether its on laptops, VMs or QA servers. More simply put, “Docker helps developers build and ship higher-quality applications, faster.” A clean, safe, hygienic and portable runtime environment for your app. No worries about missing dependencies, packages and other pain points during subsequent deployments. Run each app in its own isolated container, so you can run various versions of libraries and other dependencies for each app without worrying Automate testing, integration, packaging…anything you can script Reduce/eliminate concerns about compatibility on different platforms, either your own or your customers. Cheap, zero-penalty containers to deploy services? A VM without the overhead of a VM? Instant replay and reset of image snapshots? That’s the power of Docker “Docker interests me because it allows simple environment isolation and repeatability. I can create a run-time environment once, package it up, then run it again on any other machine. Furthermore, everything that runs in that environment is isolated from the underlying host (much like a virtual machine). And best of all, everything is fast and simple.” -Gregory Szorc, Mozilla Foundation http://gregoryszorc.com/blog/2013/05/19/using-docker-to-build-firefox/
  17. The technology is particularly appealing for developers because it is now easier than ever to make sure you develop, test and deploy using the same environment as your colleagues, resulting in less issues caused by differences or missing libraries. Docker also offers developers the flexibility to quickly run their apps anywhere, whether its on laptops, VMs or QA servers. More simply put, “Docker helps developers build and ship higher-quality applications, faster.” A clean, safe, hygienic and portable runtime environment for your app. No worries about missing dependencies, packages and other pain points during subsequent deployments. Run each app in its own isolated container, so you can run various versions of libraries and other dependencies for each app without worrying Automate testing, integration, packaging…anything you can script Reduce/eliminate concerns about compatibility on different platforms, either your own or your customers. Cheap, zero-penalty containers to deploy services? A VM without the overhead of a VM? Instant replay and reset of image snapshots? That’s the power of Docker “Docker interests me because it allows simple environment isolation and repeatability. I can create a run-time environment once, package it up, then run it again on any other machine. Furthermore, everything that runs in that environment is isolated from the underlying host (much like a virtual machine). And best of all, everything is fast and simple.” -Gregory Szorc, Mozilla Foundation http://gregoryszorc.com/blog/2013/05/19/using-docker-to-build-firefox/
  18. Sysadmins are finding the technology useful as well, because of the ability to standardize development environments among other reasons. “Docker helps sysadmins deploy and run any app on any infrastructure, quickly and reliably.” Make the entire lifecycle more efficient, consistent, and repeatable Increase the quality of code produced by developers. Eliminate inconsistencies between development, test, production, and customer environments Support segregation of duties Significantly improves the speed and reliability of continuous deployment and continuous integration systems Because the containers are so lightweight, address significant performance, costs, deployment, and portability issues normally associated with VMs
  19. Sysadmins are finding the technology useful as well, because of the ability to standardize development environments among other reasons. “Docker helps sysadmins deploy and run any app on any infrastructure, quickly and reliably.” Make the entire lifecycle more efficient, consistent, and repeatable Increase the quality of code produced by developers. Eliminate inconsistencies between development, test, production, and customer environments Support segregation of duties Significantly improves the speed and reliability of continuous deployment and continuous integration systems Because the containers are so lightweight, address significant performance, costs, deployment, and portability issues normally associated with VMs
  20. On the business side, the benefits may be huge. By simplifying the way we deploy apps and creating more manageable environments, Docker can streamline all related processes, potentially offering a boost in productivity, reducing risks and reducing costs.
  21. On the business side, the benefits may be huge. By simplifying the way we deploy apps and creating more manageable environments, Docker can streamline all related processes, potentially offering a boost in productivity, reducing risks and reducing costs.
  22. On the business side, the benefits may be huge. By simplifying the way we deploy apps and creating more manageable environments, Docker can streamline all related processes, potentially offering a boost in productivity, reducing risks and reducing costs.
  23. On the business side, the benefits may be huge. By simplifying the way we deploy apps and creating more manageable environments, Docker can streamline all related processes, potentially offering a boost in productivity, reducing risks and reducing costs.
  24. Docker daemon runtime, runs on host machine, spin up containers, explain how it’s different from Windows and Mac
  25. Docker daemon runtime, runs on host machine, spin up containers, explain how it’s different from Windows and Mac
  26. Docker daemon runtime, runs on host machine, spin up containers, explain how it’s different from Windows and Mac
  27. Docker daemon runtime, runs on host machine, spin up containers, explain how it’s different from Windows and Mac
  28. Give example of image
  29. Give example of image
  30. Give example of image
  31. Give example of image
  32. Explain the whole workflow here
  33. Installation is very easy on linux boxes. You can use apt-get or yum to install docker-engine. You don’t need a virtualbox on linux box as the docker runs natively on linux box.
  34. Download and run docker toolbox installer on Windows and Mac OS. You are all set with docker environment on your computer. What you install is actually:d ocker client, server, machine, compose, kitematic and virtualbox. We will talk about compose and kitematic later.
  35. Source code of the slide is a complete web application which can be run using spring boot CLI. No need to worry if you are not aware of Spring boot. I can easily create a jar file with embedded tomcat and other jar dependencies using spring boot CLI tool. To execute jar file you just need Java and nothing else. So the jar file and the java dependency is of more interest in demo. You can see how easy it to create jar file and run it using java. Let me check the files in current directory. I have already created the jar file. Let me try this to run using docker container. docker run java:8 java -jar hello.jar So command what actually does is to instruct docker server to fetch java image with tag 8. Docker service will first look into local cache and if it is found there, the cached image will be used to create the container. Once the container is created it will execute the command that you have specified in out case execute the jar file. Lets try to run this. Oops it failed. It was unable to find hello.jar. Very surprising as you already seen this in directory listing that the file exists. Let’s recall the concept of Container. Container runs in isolation and does not have access to files outside the container file system. That’s why hello.jar is not there. We have to hello.jar available to the container by some means. One quick solution is to mount working dir as a volume to this folder. Lets try this. docker run -v $PWD:/app java:8 java -jar /app/hello.jar so all the files and folders of present working directory will be available in /app folder of the container. Lets try to find the usual text that says tomcat is ready and listening on 8080 port. Here it is. Lets access this web app using browser. http://localhost:8080 . Hmmm it’s still not working. It seems that nothing is running on port 8080. Any guess what might be the issue. Well it’s not just the file system that is isolated, the whole network is isolated from the host machine. We have to explicitly publish container’s port on host machine. Let me try this. docker run -v $PWD:/app -p 8080:8080 java:8 java -jar /app/hello.jar Violla, its working now. Lets prepare a docker image to pack all the dependencies that we passed as command line argument so far.
  36. So what’s special with Dockerfiles. It’s just a simple text file containing instructions or commands for A Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image. Here I am instructing to use java:8 image as a base image. Adding some meta information. Copy some file to container. Expose 8080 port so that host machine can bind to it. Run java command Each instruction will be added as a layer and cached locally. Next time you rebuild the image the, Docker will use cached version of layer whenever possible. Let’s build the image and and push it to Docker hub so that it will be available globally.
  37. file list check Dockerfile content docker build -t imagename docker history to check layers Let me adjust the zoom so that it is readable Lets push the image Each layer is pushed to docker hub Go to docker hub site
  38. Real life application are not so simple. I have an application for managing TODO. I have divided the application into services which can be independently developed. Noticalble components are the backend, frontend and worker. Backend application uses MongoDB for persistence and spring framework for exposing REST endpoints to manage TODOs. Worker is responsible for sending notifications and depends on Backend service. Worker is a lightweight Java application using Quartz scheduler which sends notification in the form of email and SMS. The frontend application has been written using Nodejs and Angularjs and provides a nice UI to manage TODO. End user can access frontend app from browser. It interacts with backend service REST endpoints. Docker-compose is a nice tool for managing this type of distributed application consisting of many small applications. Docker-compose will take care of building image or pulling it from docker hub for each services described your docker-compose.yml file. It will take of linking of services by making necessary changes to /etc/hosts file so that the linked service can be referenced by name instead of hardcoded IP address.
  39. You can see the docker-compose.yml file content on the slide. It describes 3 services: mongodb, backend and frontend. Mongodb is linked in backend service. Backend service is linked to frontend service. Notice backendServiceUrl environment variable which is using backend instead of IP address to refer to the backend application.
  40. Dcoker is installed Lets check version of docker client and server Let’s downloaded images > none Lets check containers if any running or in stopped state > none java, mongo client, mongodb, nodejs > not installed what files are available check docker-compose file content let’s compose it …. optional you can specify -d for detached it will check fetch images from local cache or docker hub once the image is ready it will create the container and bind the linked services if any
  41. Docker-compose is suitable for small applications and is very handy for development. Production environment is not that simple. You usually have cluster of services and you want a tool that can manage those clusters and keep running the required containers. Scaling of containers should be easily done irrespective of which machine is being used for running new containers. There are many orchestration tools available. Docker swarm is one of them. You can explore those on your own.