This presentation about Docker will help you learn what Docker and Docker compose is, benefits of Docker compose, differences between Docker compose and Docker swarm, basic commands of docker compose and finally, a demo on docker compose. Docker is a tool which runs containers, whereas Docker Compose is used for running multiple containers as a single service. With compose, containers run in isolation (but they interact with each other). After watching this video, you will able to create a YAML file of docker compose and run multiple containers at a time. Now, let us get started and understand how does a Docker compose work.
Below are the topics covered in this Docker compose presentation:
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
Why learn DevOps?
Simplilearn’s DevOps training course is designed to help you become a DevOps practitioner and apply the latest in DevOps methodology to automate your software development lifecycle right out of the class. You will master configuration management; continuous integration deployment, delivery and monitoring using DevOps tools such as Git, Docker, Jenkins, Puppet and Nagios in a practical, hands on and interactive approach. The Devops training course focuses heavily on the use of Docker containers, a technology that is revolutionizing the way apps are deployed in the cloud today and is a critical skillset to master in the cloud age.
After completing the DevOps training course you will achieve hands on expertise in various aspects of the DevOps delivery model. The practical learning outcomes of this Devops training course are:
An understanding of DevOps and the modern DevOps toolsets
The ability to automate all aspects of a modern code delivery and deployment pipeline using:
1. Source code management tools
2. Build tools
3. Test automation tools
4. Containerization through Docker
5. Configuration management tools
6. Monitoring tools
Who should take this course?
DevOps career opportunities are thriving worldwide. DevOps was featured as one of the 11 best jobs in America for 2017, according to CBS News, and data from Payscale.com shows that DevOps Managers earn as much as $122,234 per year, with DevOps engineers making as much as $151,461. DevOps jobs are the third-highest tech role ranked by employer demand on Indeed.com but have the second-highest talent deficit.
1. This DevOps training course will be of benefit the following professional roles:
2. Software Developers
3. Technical Project Managers
4. Architects
5. Operations Support
6. Deployment engineers
7. IT managers
8. Development managers
Learn more at https://www.simplilearn.com/cloud-computing/devops-practitioner-certification-training
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?
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
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
Style - 01
Style - 01
Style - 01
Style - 01
Style - 01
Style - 01
Style - 01
Style - 01
Style - 01
Style - 01
Style - 01
Style - 01
Myntra has a separate server for different sections
Also, it has a different database for individual server