SlideShare uma empresa Scribd logo
1 de 23
Baixar para ler offline
Dockerize Your Project!
Improve your project development workflow with
docker and docker-compose
git/twitter @imrenagi
Docker Community Leader, Indonesia
Docker Indonesia
(https://www.meetup.com/Docker-Indonesia/)
Upcoming Meetup:
1. March 7th, 2018, 6.30pm-9pm @Traveloka
2. March 28th, 2018, 6.30pm-9pm @Gojek
Interested to be the next speaker or venue sponsor??
Reach me at @imrenagi / imre.nagi2812@gmail.com
Outline
Docker Basic
What is Docker / What is Docker Not
Basic Docker Commands
Dockerfiles
Docker Compose
What is Docker Compose
Docker-compose.yml
Demo & Hands On
Develop multi-service app (tweet live
sentiment analytics)
Q&A
Docker?
● “VM inside VM”
Docker containers are not VMs
● Easy connection to make
● Fundamentally different architectures
● Fundamentally different benefits
Some Docker Vocabularies
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
Registry Service (Docker Hub or Docker Trusted Registry)
Cloud or server based storage and distribution service for your images
What is a container?
● Standardized packaging
for software and
dependencies
● Isolate apps from each
other
● Share the same OS kernel
● Works for all major Linux
distributions
Why dockerize your project?
● Best developer reason -> “it doesn’t work on my machine!”
● Reduce time for project setup in local development environment
● Make deployment to cloud platform (AWS, GCP, Azure) easy!
Dockerfile
● Instructions on how to
build a Docker image
● Looks very similar to
“native” commands
● Important to optimize
your Dockerfile
$ docker image pull redis:latest
$ docker image ls
$ docker container run –d –p 6379:6379 –-name redis
redis:latest
$ docker container ps
$ docker container stop redis (or <container id>)
$ docker container rm redis (or <container id>)
$ docker image rm redis:latest (or <imageid>)
$ docker build –t imrenagi/rojak-api:2.0 .
$ docker image push imrenagi/rojak-api:2.0
Basic Docker Commands
Docker compose is a tool for creating and managing
multi container applications
Docker Compose: Multi Container Applications
● Containers are all defined in a single file called docker-compose.yml
● Each container runs a particular component/service of your application. For
example:
○ Web frontend
○ User authentication
○ Payments gateway
○ Database
● Compose will spin up all of your containers in a single command
● Build and run one container at a
time
● Manually connect container
together
● Must be careful with dependencies
and start up order
Docker Compose: Multi Container Applications
● Define multi container app in
compose.yml file
● Single command to deploy entire app
● Handle container dependencies
● Works with Docker Swarm, Networking,
Volumes
● Easy to migrate the application to
Kubernetes
Docker Compose: Multi Container Applications
Docker-Compose
Demo/Hands On
https://github.com/imrenagi/tweet-livestream
Real-time twitter sentiment analytics
Requirements:
● Read live stream tweet from twitter stream API
● Determine the sentiment of a tweet (positive, negative, or neutral)
● Show the number of tweet based on its sentiment in frontend web application
via web browser
Context:
● Imagine we are working on a big company consists of several teams, in
where each small team is responsible to maintain a particular service
● Microservices??
Application Architecture (Monolith)
Twitter
stream API
Application Architecture (Microservice?)
Machine
Learning
Service
Pub/Sub
Service
Serving Layer:
Frontend App
Service
Twitter
stream API
Easy to scale each
microservice!!
Dockerfile for Machine learning service
Dockerfile for Frontend service
Docker-compose.yml
docker-compose up
And let the magic begins
THANK YOU :)
@imrenagi

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Serverless with Knative - Mete Atamel (Google)
Serverless with Knative - Mete Atamel (Google)Serverless with Knative - Mete Atamel (Google)
Serverless with Knative - Mete Atamel (Google)
 
IThome DevOps Summit - IoT、docker與DevOps
IThome DevOps Summit - IoT、docker與DevOpsIThome DevOps Summit - IoT、docker與DevOps
IThome DevOps Summit - IoT、docker與DevOps
 
End-to-end test automation with Endtest.dev
End-to-end test automation with Endtest.devEnd-to-end test automation with Endtest.dev
End-to-end test automation with Endtest.dev
 
Building Resilient Cloud Native Apps in GKE
Building Resilient Cloud Native Apps in GKEBuilding Resilient Cloud Native Apps in GKE
Building Resilient Cloud Native Apps in GKE
 
Resilient microservices with Kubernetes - Mete Atamel - Codemotion Rome 2017
Resilient microservices with Kubernetes - Mete Atamel - Codemotion Rome 2017Resilient microservices with Kubernetes - Mete Atamel - Codemotion Rome 2017
Resilient microservices with Kubernetes - Mete Atamel - Codemotion Rome 2017
 
Knative Intro
Knative IntroKnative Intro
Knative Intro
 
Introduction to Kubernetes and Google Container Engine (GKE)
Introduction to Kubernetes and Google Container Engine (GKE)Introduction to Kubernetes and Google Container Engine (GKE)
Introduction to Kubernetes and Google Container Engine (GKE)
 
Take the Fastest Path to Node.Js Application Development with Bitnami & AWS L...
Take the Fastest Path to Node.Js Application Development with Bitnami & AWS L...Take the Fastest Path to Node.Js Application Development with Bitnami & AWS L...
Take the Fastest Path to Node.Js Application Development with Bitnami & AWS L...
 
Cncf event driven autoscaling with keda
Cncf   event driven autoscaling with kedaCncf   event driven autoscaling with keda
Cncf event driven autoscaling with keda
 
How to Live in a Post-Spring-Cloud-Netflix World - Olga Maciaszek-Sharma & Ja...
How to Live in a Post-Spring-Cloud-Netflix World - Olga Maciaszek-Sharma & Ja...How to Live in a Post-Spring-Cloud-Netflix World - Olga Maciaszek-Sharma & Ja...
How to Live in a Post-Spring-Cloud-Netflix World - Olga Maciaszek-Sharma & Ja...
 
Distributed Storage in the Cloud
Distributed Storage in the CloudDistributed Storage in the Cloud
Distributed Storage in the Cloud
 
Tooling Matters - Development tools
Tooling Matters - Development toolsTooling Matters - Development tools
Tooling Matters - Development tools
 
Kubernetes and the Rise of Application-centric Computing
Kubernetes and the Rise of Application-centric ComputingKubernetes and the Rise of Application-centric Computing
Kubernetes and the Rise of Application-centric Computing
 
KubeCon 2019 - Scaling your cluster (both ways)
KubeCon 2019 - Scaling your cluster (both ways)KubeCon 2019 - Scaling your cluster (both ways)
KubeCon 2019 - Scaling your cluster (both ways)
 
Kubernetes & Google Kubernetes Engine (GKE)
Kubernetes & Google Kubernetes Engine (GKE)Kubernetes & Google Kubernetes Engine (GKE)
Kubernetes & Google Kubernetes Engine (GKE)
 
Publishing containerized micro services with Azure API management
Publishing containerized micro services with Azure API managementPublishing containerized micro services with Azure API management
Publishing containerized micro services with Azure API management
 
The what, why and how of knative
The what, why and how of knativeThe what, why and how of knative
The what, why and how of knative
 
Tu non puoi passare! Policy compliance con OPA Gatekeeper | Niccolò Raspa
Tu non puoi passare! Policy compliance con OPA Gatekeeper | Niccolò RaspaTu non puoi passare! Policy compliance con OPA Gatekeeper | Niccolò Raspa
Tu non puoi passare! Policy compliance con OPA Gatekeeper | Niccolò Raspa
 
Kubernetes Native Serverless solution: Kubeless
Kubernetes Native Serverless solution: KubelessKubernetes Native Serverless solution: Kubeless
Kubernetes Native Serverless solution: Kubeless
 
Continuous Integration with Jenkins and Java EE
Continuous Integration with Jenkins and Java EEContinuous Integration with Jenkins and Java EE
Continuous Integration with Jenkins and Java EE
 

Semelhante a Dockerize Your Project - GDGBogor

14309525_docker_docker_docker_docker_introduction.ppt
14309525_docker_docker_docker_docker_introduction.ppt14309525_docker_docker_docker_docker_introduction.ppt
14309525_docker_docker_docker_docker_introduction.ppt
aravym456
 

Semelhante a Dockerize Your Project - GDGBogor (20)

DevAssistant, Docker and You
DevAssistant, Docker and YouDevAssistant, Docker and You
DevAssistant, Docker and You
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
14309525_docker_docker_docker_docker_introduction.ppt
14309525_docker_docker_docker_docker_introduction.ppt14309525_docker_docker_docker_docker_introduction.ppt
14309525_docker_docker_docker_docker_introduction.ppt
 
Introduction to Docker - VIT Campus
Introduction to Docker - VIT CampusIntroduction to Docker - VIT Campus
Introduction to Docker - VIT Campus
 
Domino on docker version 2
Domino on docker version 2Domino on docker version 2
Domino on docker version 2
 
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_tech_guild ppt.ppt technical guild
Docker_tech_guild ppt.ppt technical guildDocker_tech_guild ppt.ppt technical guild
Docker_tech_guild ppt.ppt technical guild
 
A Shift from Monolith to Microservice using Docker
A Shift from Monolith to Microservice using DockerA Shift from Monolith to Microservice using Docker
A Shift from Monolith to Microservice using Docker
 
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 with WordPress
Docker with WordPressDocker with WordPress
Docker with WordPress
 
Dockerizing your java development environment
Dockerizing your java development environmentDockerizing your java development environment
Dockerizing your java development environment
 
Docker workshop GDSC_CSSC
Docker workshop GDSC_CSSCDocker workshop GDSC_CSSC
Docker workshop GDSC_CSSC
 
Demystifying Docker101
Demystifying Docker101Demystifying Docker101
Demystifying Docker101
 
Demystifying Docker
Demystifying DockerDemystifying Docker
Demystifying Docker
 
Docker - What it is and how to get started?
Docker - What it is and how to get started?Docker - What it is and how to get started?
Docker - What it is and how to get started?
 
Docker - A Quick Introduction Guide
Docker - A Quick Introduction GuideDocker - A Quick Introduction Guide
Docker - A Quick Introduction Guide
 
Dockerize the World - presentation from Hradec Kralove
Dockerize the World - presentation from Hradec KraloveDockerize the World - presentation from Hradec Kralove
Dockerize the World - presentation from Hradec Kralove
 
DCSF 19 Docker Enterprise Platform and Architecture
DCSF 19 Docker Enterprise Platform and ArchitectureDCSF 19 Docker Enterprise Platform and Architecture
DCSF 19 Docker Enterprise Platform and Architecture
 
Docker
DockerDocker
Docker
 

Último

DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
MayuraD1
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
Epec Engineered Technologies
 

Último (20)

FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal load
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planes
 

Dockerize Your Project - GDGBogor

  • 1. Dockerize Your Project! Improve your project development workflow with docker and docker-compose git/twitter @imrenagi Docker Community Leader, Indonesia
  • 2. Docker Indonesia (https://www.meetup.com/Docker-Indonesia/) Upcoming Meetup: 1. March 7th, 2018, 6.30pm-9pm @Traveloka 2. March 28th, 2018, 6.30pm-9pm @Gojek Interested to be the next speaker or venue sponsor?? Reach me at @imrenagi / imre.nagi2812@gmail.com
  • 3. Outline Docker Basic What is Docker / What is Docker Not Basic Docker Commands Dockerfiles Docker Compose What is Docker Compose Docker-compose.yml Demo & Hands On Develop multi-service app (tweet live sentiment analytics) Q&A
  • 5. Docker containers are not VMs ● Easy connection to make ● Fundamentally different architectures ● Fundamentally different benefits
  • 6. Some Docker Vocabularies 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 Registry Service (Docker Hub or Docker Trusted Registry) Cloud or server based storage and distribution service for your images
  • 7. What is a container? ● Standardized packaging for software and dependencies ● Isolate apps from each other ● Share the same OS kernel ● Works for all major Linux distributions
  • 8. Why dockerize your project? ● Best developer reason -> “it doesn’t work on my machine!” ● Reduce time for project setup in local development environment ● Make deployment to cloud platform (AWS, GCP, Azure) easy!
  • 9. Dockerfile ● Instructions on how to build a Docker image ● Looks very similar to “native” commands ● Important to optimize your Dockerfile
  • 10. $ docker image pull redis:latest $ docker image ls $ docker container run –d –p 6379:6379 –-name redis redis:latest $ docker container ps $ docker container stop redis (or <container id>) $ docker container rm redis (or <container id>) $ docker image rm redis:latest (or <imageid>) $ docker build –t imrenagi/rojak-api:2.0 . $ docker image push imrenagi/rojak-api:2.0 Basic Docker Commands
  • 11. Docker compose is a tool for creating and managing multi container applications Docker Compose: Multi Container Applications ● Containers are all defined in a single file called docker-compose.yml ● Each container runs a particular component/service of your application. For example: ○ Web frontend ○ User authentication ○ Payments gateway ○ Database ● Compose will spin up all of your containers in a single command
  • 12. ● Build and run one container at a time ● Manually connect container together ● Must be careful with dependencies and start up order Docker Compose: Multi Container Applications ● Define multi container app in compose.yml file ● Single command to deploy entire app ● Handle container dependencies ● Works with Docker Swarm, Networking, Volumes ● Easy to migrate the application to Kubernetes
  • 13. Docker Compose: Multi Container Applications
  • 16. Real-time twitter sentiment analytics Requirements: ● Read live stream tweet from twitter stream API ● Determine the sentiment of a tweet (positive, negative, or neutral) ● Show the number of tweet based on its sentiment in frontend web application via web browser Context: ● Imagine we are working on a big company consists of several teams, in where each small team is responsible to maintain a particular service ● Microservices??
  • 18. Application Architecture (Microservice?) Machine Learning Service Pub/Sub Service Serving Layer: Frontend App Service Twitter stream API Easy to scale each microservice!!
  • 19. Dockerfile for Machine learning service
  • 22. docker-compose up And let the magic begins