SlideShare a Scribd company logo
Docker Compose
What’s in it for you?
1. What is Docker?
2. What is a Docker Compose?
3. Benefits of Docker compose
4. Docker Compose vs Docker Swarm
5. Basic commands of Docker
6. Demo
Let’s get started
Docker Compose
What is Docker?
Docker is a tool which is used by developer and operation teams to create and automate the deployment of
applications in lightweight containers so that applications can work efficiently in different environments
Docker Engine
Host OS
Infrastructure
App A
Bins/Libs
App C
Bins/Libs
Docker Container
1
App B
Bins/Libs
Docker Container
2
Docker Container
3
What is Docker?
Docker Engine
Host OS
Infrastructure
App A
Bins/Libs
App C
Bins/Libs
Docker Container
1
App B
Bins/Libs
Docker Container
2
Docker Container
3
Note
Container is a software
package that consists of
all the dependencies
required to run an
application
Docker is a tool which is used by developer and operation teams to create and automate the deployment of
applications in lightweight containers so that applications can work efficiently in different environments
What is Docker?
• First, Docker image is build using a Docker file
• A Docker Image contains all the project’s code, whereas a Dockerfile is a text file which contains commands for
building a Docker Image
How are Docker containers created ?
Docker File
Docker Image
What is Docker?
• With Docker Image, an individual can run the project code in order to create Docker Containers
• Also, when a Docker Image is built, it’s uploaded by a user in the Docker Hub
How are Docker containers created ?
Docker File
Docker Container
Docker Image Docker Hub
What is Docker?
How are Docker containers created ?
Docker File
Docker Container
Docker Image Docker Hub
Container
Container
• From the Docker Hub, users can pull any Docker Image and build new containers
What is Docker?
How are Docker containers created ?
Docker File
Docker Container
Docker Image Docker Hub
• From the Docker Hub, users can pull any Docker Image and build new containers
Container
Container
What if a user wants to use two
containers in a single service?
Docker Compose
Suppose, you have more than one Container in
Docker (like , a webserver and a database running
in separate containers) building, running, and connecting the containers from separate Dockerfiles is difficult and can take a lot of time
Docker Compose
Suppose, in Docker you have more than one
Container (like , a webserver and database
running in separate containers) building, running,
and connecting the containers from separate
Dockerfiles is difficult and can take a lot of time
Docker Compose
Suppose, in Docker you have more than one
Container (like , a webserver and database
running in separate containers) building, running,
and connecting the containers from separate
Dockerfiles is difficult and can take a lot of time
But with Docker Compose, It is
possible to easily run more than one
container in a single service
Docker Compose
Suppose, in Docker you have more than one
Container (like , a webserver and database
running in separate containers) building, running,
and connecting the containers from separate
Dockerfiles is difficult and can take a lot of time
Using Docker Compose, It is easily
possible to run more than one
container in a single service
But what is Docker Compose?
Consider an example of Myntra, where
What is Docker Compose?
Product
catalogue
(server)
Cart
(server)
Checkout
(server)
What is Docker Compose?
Login
account
(server)
Consider an example of Myntra, where
Product
catalogue
(server)
Cart
(server)
Checkout
(server)
Product (DB) Cart
(DB)
What is Docker Compose?
Login
account
(server)
Accounts
(DB)
Checkout
(DB)
Consider an example of Myntra, where
Product
catalogue
(server)
Cart
(server)
Checkout
(server)
Product (DB) Cart
(DB)
What is Docker Compose?
This is a micro service
Login
account
(server)
Accounts
(DB)
Checkout
(DB)
Consider an example of Myntra, where
Product
catalogue
(server)
Login
account
(server)
Cart
(server)
Checkout
(server)
Accounts
(DB)
Product (DB) Cart
(DB)
Checkout
(DB)
What is Docker Compose?
Suppose more products are
added, this microservice can
be scaled easily without
making any changes to the
other microservices
Consider an example of Myntra, where
We can relate the example of Myntra to
Docker, where Docker Compose can connect different containers
(server and DB) as a single service
What is Docker Compose?
Server
DB
Server
DB
Server
DB
Server
DB
What is Docker Compose?
• Docker Compose is used for running multiple containers as a single service
{Docker
Compose
Single
service
Container
Container
What is Docker Compose?
• Docker Compose is used for running multiple containers as a single service
• Here, containers run in isolation but can interact with each other
Container
Container
What is Docker Compose?
• Docker Compose is used for running multiple containers as a single service
• Here, containers run in isolation but can interact with each other
• All Docker Compose files are YAML files
Container
Container
Docker
Compose file
What is Docker Compose?
• Docker Compose is used for running multiple containers as a single service
• Here, containers run in isolation but can interact with each other
• All Docker Compose files are YAML files
• In Docker Compose, a user can start all the services (containers) using a single command
Container
Container
Docker
Compose fileDocker Compose up
Command
=
What is Docker Compose?
For example:
If you have an application which requires NGINX server and Redis database, you could create one Docker
Compose file which can run both containers as a service without the need to start each one separately
Container 1
Container 2
What is Docker Compose?
For example:
If you have an application which requires NGINX server and Redis database, you can create a Docker Compose
file which can run both the containers as a service without the need to start each one separately
Docker file
Docker file
Docker Compose
(YAML file)
Single
service
Container 1
Container 2
Benefits of Docker Compose
Single host
deployment
Benefits of Docker Compose
Quick and easy
configuration
Single host
deployment
Benefits of Docker Compose
High productivityQuick and easy
configuration
Single host
deployment
Benefits of Docker Compose
Security
Single host
deployment
High productivityQuick and easy
configuration
Docker Compose
Wait a minute! I guess
Docker Compose is quite similar to
Docker Swarm?
Docker Compose
Wait a minute! I guess
Docker Compose is quite similar to
Docker Swarm!
No, it’s not! Let me show you the
difference
Docker Compose vs Docker swarm
 It creates multiple containers on a
single host
Docker Compose Docker Swarm
Docker Compose vs Docker swarm
 It creates multiple containers on a
single host
 It creates multiple containers on multiple hosts
Docker Compose Docker Swarm
Docker Compose vs Docker swarm
 It creates multiple containers on a
single host
 It uses YAML file to manage different
containers as a single service
 It creates multiple containers on multiple hosts
Docker Compose Docker Swarm
Docker Compose vs Docker swarm
 It creates multiple containers on a
single host
 It uses YAML file to manage different
containers as a single service
 It creates multiple containers on multiple hosts
 It doesn’t use any file but helps you to manage
different Docker hosts in a cluster
Docker Compose Docker Swarm
Basic commands of Docker compose
Start all servuices with a command:
Docker Compose up
Start all servuices with a command:
Docker Compose down
Command to install Docker Compose
using pip:
pip install -U Docker-compose
Command to check the version of Docker
Compose:
Docker-compose-v
Command to run Docker Compose file
Docker-compose up -d
Command to list down all the process
Docker ps
Command to scale a service
Docker Compose up –d --scale
Command to use YAML files to configure
application services
Docker Compose.yml
Docker Compose | Docker Compose Tutorial | Docker Tutorial For Beginners | DevOps Tools |Simplilearn

More Related Content

What's hot (20)

PDF
Docker Introduction
Peng Xiao
 
PPTX
Docker Basics
DuckDuckGo
 
PDF
Docker Explained | What Is A Docker Container? | Docker Simplified | Docker T...
Edureka!
 
PDF
Introduction to Docker - VIT Campus
Ajeet Singh Raina
 
PDF
Introduction to Docker Compose
Ajeet Singh Raina
 
PPT
Docker introduction
Phuc Nguyen
 
PDF
Introduction to docker
Instruqt
 
PPTX
Docker introduction & benefits
Amit Manwade
 
PDF
Docker-PPT.pdf for presentation and other
adarsh20cs004
 
PPTX
Introduction to Docker
Pubudu Jayawardana
 
PPTX
Docker.pptx
balaji257
 
PPTX
Docker 101 : Introduction to Docker and Containers
Yajushi Srivastava
 
PDF
Docker Introduction
MANAOUIL Karim
 
PPTX
Getting started with Docker
Ravindu Fernando
 
PDF
Docker
SangtongPeesing
 
PPTX
Dockers and containers basics
Sourabh Saxena
 
PDF
Docker in real life
Nguyen Van Vuong
 
PDF
What is Jenkins | Jenkins Tutorial for Beginners | Edureka
Edureka!
 
PDF
Introduction to container based virtualization with docker
Bangladesh Network Operators Group
 
PDF
Introduction to Docker
Aditya Konarde
 
Docker Introduction
Peng Xiao
 
Docker Basics
DuckDuckGo
 
Docker Explained | What Is A Docker Container? | Docker Simplified | Docker T...
Edureka!
 
Introduction to Docker - VIT Campus
Ajeet Singh Raina
 
Introduction to Docker Compose
Ajeet Singh Raina
 
Docker introduction
Phuc Nguyen
 
Introduction to docker
Instruqt
 
Docker introduction & benefits
Amit Manwade
 
Docker-PPT.pdf for presentation and other
adarsh20cs004
 
Introduction to Docker
Pubudu Jayawardana
 
Docker.pptx
balaji257
 
Docker 101 : Introduction to Docker and Containers
Yajushi Srivastava
 
Docker Introduction
MANAOUIL Karim
 
Getting started with Docker
Ravindu Fernando
 
Dockers and containers basics
Sourabh Saxena
 
Docker in real life
Nguyen Van Vuong
 
What is Jenkins | Jenkins Tutorial for Beginners | Edureka
Edureka!
 
Introduction to container based virtualization with docker
Bangladesh Network Operators Group
 
Introduction to Docker
Aditya Konarde
 

Similar to Docker Compose | Docker Compose Tutorial | Docker Tutorial For Beginners | DevOps Tools |Simplilearn (20)

PDF
Docker compose and swarm
Tanmay Mehra
 
PDF
Adventures in docker compose
LinkMe Srl
 
PPTX
Introduction to Docker Compose
Prabhas Gupte
 
PDF
Dockers & kubernetes detailed - Beginners to Geek
wiTTyMinds1
 
PPTX
Docker for the new Era: Introducing Docker,its components and tools
Ramit Surana
 
PPTX
Academy PRO: Docker. Lecture 3
Binary Studio
 
PDF
Introduction to Docker - Vellore Institute of Technology
Ajeet Singh Raina
 
PDF
Docker compose workshop
Matthias Noback
 
PDF
Introduction to docker and docker compose
Lalatendu Mohanty
 
PDF
Introduction of Docker and Docker Compose
Dr. Ketan Parmar
 
PDF
Dockerize Your Project - GDGBogor
Imre Nagi
 
PDF
A Shift from Monolith to Microservice using Docker
Ajeet Singh Raina
 
PPTX
Docker Introduction and its Usage in Machine Learning
yogendra18
 
PDF
Docker, but what it is?
Julien Maitrehenry
 
PDF
Docker Introduction.pdf
OKLABS
 
PPT
14309525_docker_docker_docker_docker_introduction.ppt
aravym456
 
PPTX
Docker
Narato
 
PDF
Rapid Development With Docker Compose
Justin Crown
 
PPTX
Docker Basic to Advance
Paras Jain
 
PPTX
Dockerizing a Symfony2 application
Roman Rodomansky
 
Docker compose and swarm
Tanmay Mehra
 
Adventures in docker compose
LinkMe Srl
 
Introduction to Docker Compose
Prabhas Gupte
 
Dockers & kubernetes detailed - Beginners to Geek
wiTTyMinds1
 
Docker for the new Era: Introducing Docker,its components and tools
Ramit Surana
 
Academy PRO: Docker. Lecture 3
Binary Studio
 
Introduction to Docker - Vellore Institute of Technology
Ajeet Singh Raina
 
Docker compose workshop
Matthias Noback
 
Introduction to docker and docker compose
Lalatendu Mohanty
 
Introduction of Docker and Docker Compose
Dr. Ketan Parmar
 
Dockerize Your Project - GDGBogor
Imre Nagi
 
A Shift from Monolith to Microservice using Docker
Ajeet Singh Raina
 
Docker Introduction and its Usage in Machine Learning
yogendra18
 
Docker, but what it is?
Julien Maitrehenry
 
Docker Introduction.pdf
OKLABS
 
14309525_docker_docker_docker_docker_introduction.ppt
aravym456
 
Docker
Narato
 
Rapid Development With Docker Compose
Justin Crown
 
Docker Basic to Advance
Paras Jain
 
Dockerizing a Symfony2 application
Roman Rodomansky
 
Ad

More from Simplilearn (20)

PPTX
Top 50 Scrum Master Interview Questions | Scrum Master Interview Questions & ...
Simplilearn
 
PPTX
Bagging Vs Boosting In Machine Learning | Ensemble Learning In Machine Learni...
Simplilearn
 
PPTX
Future Of Social Media | Social Media Trends and Strategies 2025 | Instagram ...
Simplilearn
 
PPTX
SQL Query Optimization | SQL Query Optimization Techniques | SQL Basics | SQL...
Simplilearn
 
PPTX
SQL INterview Questions .pTop 45 SQL Interview Questions And Answers In 2025 ...
Simplilearn
 
PPTX
How To Start Influencer Marketing Business | Influencer Marketing For Beginne...
Simplilearn
 
PPTX
Cyber Security Roadmap 2025 | How To Become Cyber Security Engineer In 2025 |...
Simplilearn
 
PPTX
How To Become An AI And ML Engineer In 2025 | AI Engineer Roadmap | AI ML Car...
Simplilearn
 
PPTX
What Is GitHub Copilot? | How To Use GitHub Copilot? | How does GitHub Copilo...
Simplilearn
 
PPTX
Top 10 Data Analyst Certification For 2025 | Best Data Analyst Certification ...
Simplilearn
 
PPTX
Complete Data Science Roadmap For 2025 | Data Scientist Roadmap For Beginners...
Simplilearn
 
PPTX
Top 7 High Paying AI Certifications Courses For 2025 | Best AI Certifications...
Simplilearn
 
PPTX
Data Cleaning In Data Mining | Step by Step Data Cleaning Process | Data Clea...
Simplilearn
 
PPTX
Top 10 Data Analyst Projects For 2025 | Data Analyst Projects | Data Analysis...
Simplilearn
 
PPTX
AI Engineer Roadmap 2025 | AI Engineer Roadmap For Beginners | AI Engineer Ca...
Simplilearn
 
PPTX
Machine Learning Roadmap 2025 | Machine Learning Engineer Roadmap For Beginne...
Simplilearn
 
PPTX
Kotter's 8-Step Change Model Explained | Kotter's Change Management Model | S...
Simplilearn
 
PPTX
Gen AI Engineer Roadmap For 2025 | How To Become Gen AI Engineer In 2025 | Si...
Simplilearn
 
PPTX
Top 10 Data Analyst Certification For 2025 | Best Data Analyst Certification ...
Simplilearn
 
PPTX
Complete Data Science Roadmap For 2025 | Data Scientist Roadmap For Beginners...
Simplilearn
 
Top 50 Scrum Master Interview Questions | Scrum Master Interview Questions & ...
Simplilearn
 
Bagging Vs Boosting In Machine Learning | Ensemble Learning In Machine Learni...
Simplilearn
 
Future Of Social Media | Social Media Trends and Strategies 2025 | Instagram ...
Simplilearn
 
SQL Query Optimization | SQL Query Optimization Techniques | SQL Basics | SQL...
Simplilearn
 
SQL INterview Questions .pTop 45 SQL Interview Questions And Answers In 2025 ...
Simplilearn
 
How To Start Influencer Marketing Business | Influencer Marketing For Beginne...
Simplilearn
 
Cyber Security Roadmap 2025 | How To Become Cyber Security Engineer In 2025 |...
Simplilearn
 
How To Become An AI And ML Engineer In 2025 | AI Engineer Roadmap | AI ML Car...
Simplilearn
 
What Is GitHub Copilot? | How To Use GitHub Copilot? | How does GitHub Copilo...
Simplilearn
 
Top 10 Data Analyst Certification For 2025 | Best Data Analyst Certification ...
Simplilearn
 
Complete Data Science Roadmap For 2025 | Data Scientist Roadmap For Beginners...
Simplilearn
 
Top 7 High Paying AI Certifications Courses For 2025 | Best AI Certifications...
Simplilearn
 
Data Cleaning In Data Mining | Step by Step Data Cleaning Process | Data Clea...
Simplilearn
 
Top 10 Data Analyst Projects For 2025 | Data Analyst Projects | Data Analysis...
Simplilearn
 
AI Engineer Roadmap 2025 | AI Engineer Roadmap For Beginners | AI Engineer Ca...
Simplilearn
 
Machine Learning Roadmap 2025 | Machine Learning Engineer Roadmap For Beginne...
Simplilearn
 
Kotter's 8-Step Change Model Explained | Kotter's Change Management Model | S...
Simplilearn
 
Gen AI Engineer Roadmap For 2025 | How To Become Gen AI Engineer In 2025 | Si...
Simplilearn
 
Top 10 Data Analyst Certification For 2025 | Best Data Analyst Certification ...
Simplilearn
 
Complete Data Science Roadmap For 2025 | Data Scientist Roadmap For Beginners...
Simplilearn
 
Ad

Recently uploaded (20)

PDF
Introduction presentation of the patentbutler tool
MIPLM
 
PPTX
EDUCATIONAL MEDIA/ TEACHING AUDIO VISUAL AIDS
Sonali Gupta
 
PPTX
Introduction to Biochemistry & Cellular Foundations.pptx
marvinnbustamante1
 
PPTX
ENGlish 8 lesson presentation PowerPoint.pptx
marawehsvinetshe
 
PDF
Week 2 - Irish Natural Heritage Powerpoint.pdf
swainealan
 
PDF
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
PDF
Governor Josh Stein letter to NC delegation of U.S. House
Mebane Rash
 
PDF
Characteristics, Strengths and Weaknesses of Quantitative Research.pdf
Thelma Villaflores
 
PPTX
Introduction to Indian Writing in English
Trushali Dodiya
 
PPTX
Light Reflection and Refraction- Activities - Class X Science
SONU ACADEMY
 
PPTX
How to Manage Allocation Report for Manufacturing Orders in Odoo 18
Celine George
 
PPTX
Identifying elements in the story. Arrange the events in the story
geraldineamahido2
 
PDF
Horarios de distribución de agua en julio
pegazohn1978
 
PDF
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
PDF
STATEMENT-BY-THE-HON.-MINISTER-FOR-HEALTH-ON-THE-COVID-19-OUTBREAK-AT-UG_revi...
nservice241
 
PPTX
ENG8_Q1_WEEK2_LESSON1. Presentation pptx
marawehsvinetshe
 
PPTX
Post Dated Cheque(PDC) Management in Odoo 18
Celine George
 
PDF
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
PDF
IMPORTANT GUIDELINES FOR M.Sc.ZOOLOGY DISSERTATION
raviralanaresh2
 
PPTX
Controller Request and Response in Odoo18
Celine George
 
Introduction presentation of the patentbutler tool
MIPLM
 
EDUCATIONAL MEDIA/ TEACHING AUDIO VISUAL AIDS
Sonali Gupta
 
Introduction to Biochemistry & Cellular Foundations.pptx
marvinnbustamante1
 
ENGlish 8 lesson presentation PowerPoint.pptx
marawehsvinetshe
 
Week 2 - Irish Natural Heritage Powerpoint.pdf
swainealan
 
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
Governor Josh Stein letter to NC delegation of U.S. House
Mebane Rash
 
Characteristics, Strengths and Weaknesses of Quantitative Research.pdf
Thelma Villaflores
 
Introduction to Indian Writing in English
Trushali Dodiya
 
Light Reflection and Refraction- Activities - Class X Science
SONU ACADEMY
 
How to Manage Allocation Report for Manufacturing Orders in Odoo 18
Celine George
 
Identifying elements in the story. Arrange the events in the story
geraldineamahido2
 
Horarios de distribución de agua en julio
pegazohn1978
 
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
STATEMENT-BY-THE-HON.-MINISTER-FOR-HEALTH-ON-THE-COVID-19-OUTBREAK-AT-UG_revi...
nservice241
 
ENG8_Q1_WEEK2_LESSON1. Presentation pptx
marawehsvinetshe
 
Post Dated Cheque(PDC) Management in Odoo 18
Celine George
 
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
IMPORTANT GUIDELINES FOR M.Sc.ZOOLOGY DISSERTATION
raviralanaresh2
 
Controller Request and Response in Odoo18
Celine George
 

Docker Compose | Docker Compose Tutorial | Docker Tutorial For Beginners | DevOps Tools |Simplilearn

  • 2. What’s in it for you? 1. What is Docker? 2. What is a Docker Compose? 3. Benefits of Docker compose 4. Docker Compose vs Docker Swarm 5. Basic commands of Docker 6. Demo Let’s get started Docker Compose
  • 3. What is Docker? Docker is a tool which is used by developer and operation teams to create and automate the deployment of applications in lightweight containers so that applications can work efficiently in different environments Docker Engine Host OS Infrastructure App A Bins/Libs App C Bins/Libs Docker Container 1 App B Bins/Libs Docker Container 2 Docker Container 3
  • 4. What is Docker? Docker Engine Host OS Infrastructure App A Bins/Libs App C Bins/Libs Docker Container 1 App B Bins/Libs Docker Container 2 Docker Container 3 Note Container is a software package that consists of all the dependencies required to run an application Docker is a tool which is used by developer and operation teams to create and automate the deployment of applications in lightweight containers so that applications can work efficiently in different environments
  • 5. What is Docker? • First, Docker image is build using a Docker file • A Docker Image contains all the project’s code, whereas a Dockerfile is a text file which contains commands for building a Docker Image How are Docker containers created ? Docker File Docker Image
  • 6. What is Docker? • With Docker Image, an individual can run the project code in order to create Docker Containers • Also, when a Docker Image is built, it’s uploaded by a user in the Docker Hub How are Docker containers created ? Docker File Docker Container Docker Image Docker Hub
  • 7. What is Docker? How are Docker containers created ? Docker File Docker Container Docker Image Docker Hub Container Container • From the Docker Hub, users can pull any Docker Image and build new containers
  • 8. What is Docker? How are Docker containers created ? Docker File Docker Container Docker Image Docker Hub • From the Docker Hub, users can pull any Docker Image and build new containers Container Container What if a user wants to use two containers in a single service?
  • 9. Docker Compose Suppose, you have more than one Container in Docker (like , a webserver and a database running in separate containers) building, running, and connecting the containers from separate Dockerfiles is difficult and can take a lot of time
  • 10. Docker Compose Suppose, in Docker you have more than one Container (like , a webserver and database running in separate containers) building, running, and connecting the containers from separate Dockerfiles is difficult and can take a lot of time
  • 11. Docker Compose Suppose, in Docker you have more than one Container (like , a webserver and database running in separate containers) building, running, and connecting the containers from separate Dockerfiles is difficult and can take a lot of time But with Docker Compose, It is possible to easily run more than one container in a single service
  • 12. Docker Compose Suppose, in Docker you have more than one Container (like , a webserver and database running in separate containers) building, running, and connecting the containers from separate Dockerfiles is difficult and can take a lot of time Using Docker Compose, It is easily possible to run more than one container in a single service But what is Docker Compose?
  • 13. Consider an example of Myntra, where What is Docker Compose?
  • 14. Product catalogue (server) Cart (server) Checkout (server) What is Docker Compose? Login account (server) Consider an example of Myntra, where
  • 15. Product catalogue (server) Cart (server) Checkout (server) Product (DB) Cart (DB) What is Docker Compose? Login account (server) Accounts (DB) Checkout (DB) Consider an example of Myntra, where
  • 16. Product catalogue (server) Cart (server) Checkout (server) Product (DB) Cart (DB) What is Docker Compose? This is a micro service Login account (server) Accounts (DB) Checkout (DB) Consider an example of Myntra, where
  • 17. Product catalogue (server) Login account (server) Cart (server) Checkout (server) Accounts (DB) Product (DB) Cart (DB) Checkout (DB) What is Docker Compose? Suppose more products are added, this microservice can be scaled easily without making any changes to the other microservices Consider an example of Myntra, where
  • 18. We can relate the example of Myntra to Docker, where Docker Compose can connect different containers (server and DB) as a single service What is Docker Compose? Server DB Server DB Server DB Server DB
  • 19. What is Docker Compose? • Docker Compose is used for running multiple containers as a single service {Docker Compose Single service Container Container
  • 20. What is Docker Compose? • Docker Compose is used for running multiple containers as a single service • Here, containers run in isolation but can interact with each other Container Container
  • 21. What is Docker Compose? • Docker Compose is used for running multiple containers as a single service • Here, containers run in isolation but can interact with each other • All Docker Compose files are YAML files Container Container Docker Compose file
  • 22. What is Docker Compose? • Docker Compose is used for running multiple containers as a single service • Here, containers run in isolation but can interact with each other • All Docker Compose files are YAML files • In Docker Compose, a user can start all the services (containers) using a single command Container Container Docker Compose fileDocker Compose up Command =
  • 23. What is Docker Compose? For example: If you have an application which requires NGINX server and Redis database, you could create one Docker Compose file which can run both containers as a service without the need to start each one separately Container 1 Container 2
  • 24. What is Docker Compose? For example: If you have an application which requires NGINX server and Redis database, you can create a Docker Compose file which can run both the containers as a service without the need to start each one separately Docker file Docker file Docker Compose (YAML file) Single service Container 1 Container 2
  • 25. Benefits of Docker Compose Single host deployment
  • 26. Benefits of Docker Compose Quick and easy configuration Single host deployment
  • 27. Benefits of Docker Compose High productivityQuick and easy configuration Single host deployment
  • 28. Benefits of Docker Compose Security Single host deployment High productivityQuick and easy configuration
  • 29. Docker Compose Wait a minute! I guess Docker Compose is quite similar to Docker Swarm?
  • 30. Docker Compose Wait a minute! I guess Docker Compose is quite similar to Docker Swarm! No, it’s not! Let me show you the difference
  • 31. Docker Compose vs Docker swarm  It creates multiple containers on a single host Docker Compose Docker Swarm
  • 32. Docker Compose vs Docker swarm  It creates multiple containers on a single host  It creates multiple containers on multiple hosts Docker Compose Docker Swarm
  • 33. Docker Compose vs Docker swarm  It creates multiple containers on a single host  It uses YAML file to manage different containers as a single service  It creates multiple containers on multiple hosts Docker Compose Docker Swarm
  • 34. Docker Compose vs Docker swarm  It creates multiple containers on a single host  It uses YAML file to manage different containers as a single service  It creates multiple containers on multiple hosts  It doesn’t use any file but helps you to manage different Docker hosts in a cluster Docker Compose Docker Swarm
  • 35. Basic commands of Docker compose Start all servuices with a command: Docker Compose up Start all servuices with a command: Docker Compose down Command to install Docker Compose using pip: pip install -U Docker-compose Command to check the version of Docker Compose: Docker-compose-v Command to run Docker Compose file Docker-compose up -d Command to list down all the process Docker ps Command to scale a service Docker Compose up –d --scale Command to use YAML files to configure application services Docker Compose.yml

Editor's Notes