SlideShare a Scribd company logo
Docker Compose and Docker Swarm
By Tanmay Mehra
What is Docker ?
Docker is an open platform for developing, shipping, and
running applications.
Docker provides a way to run almost any application securely
isolated in a container.
The isolation and security allow you to run many containers
simultaneously on your host.
The lightweight nature of containers, which run without the
extra load of a hypervisor, means you can get more out of
your hardware.
Docker Components
Docker: the open source container virtualization platform
Docker Hub: SaaS platform for sharing and managing Docker
images
Docker Daemon runs on a host machine and does the heavy
lifting of building, running, and distributing Docker
containers.
Docker client is a Docker binary that accepts commands from
the user and communicates back and forth with daemon.
How does it work ?
Docker Demo
Create docker-machine
Pull an image
Create a Container
Start a container
Stop and Remove a container
Docker Compose
Compose is a tool for defining and running complex
applications with Docker.
With Compose, you define a multi-container application in a
single file, then spin your application up in a single command
which does everything that needs to be done to get it running.
Compose is great for development, testing, and staging
environments, as well as CI workflows.
How to use Docker
Compose ?
Define your app’s environment with a Dockerfile so it can be
reproduced anywhere.
Define the services that make up your app in docker-
compose.yml so they can be run together in an isolated
environment.
Lastly, run docker-compose up and Compose will start and
run your entire app.
Docker Compose
Docker Compose Demo
Install docker compose
Create a compose file docker-compose.yml
docker-compose up
check containers created
check server up
Docker Swarm
Docker Swarm provides native clustering to Docker.
It turns a pool of Docker hosts into a single, virtual Docker
host.
Docker Swarm solves one of the fundamental limitations of
Docker where the containers could only run on a single
Docker host.
Docker Swarm Components
like consul, zookeeper and etcd.
Swarm Scheduling
Strategies
The Docker Swarm scheduler features multiple strategies for
ranking nodes. The strategy you choose determines how
Swarm computes ranking.
spread: Swarm optimizes for the node with the least number
of running containers
binpack: The binpack strategy causes Swarm to optimize for
the node which is most packed.
random: The random strategy, like it sounds, chooses nodes at
random regardless of their available CPU or RAM.
Docker SwarmDemo
Create Swarm manager
Create Swarm nodes
Join swarm nodes with Swarm manager
Create containers using swarm manager
Run the application
Thank You !!

More Related Content

PPTX
Docker Compose: Docker Configuration for the Real World
PDF
Introduction to docker and docker compose
PDF
Docker Compose by Aanand Prasad
PDF
Introduction to Docker Compose | Docker Intermediate Workshop
PDF
Adventures in docker compose
PPTX
docker compose
PDF
GDG Lima - Docker Compose
PDF
Introduction to Docker Compose
Docker Compose: Docker Configuration for the Real World
Introduction to docker and docker compose
Docker Compose by Aanand Prasad
Introduction to Docker Compose | Docker Intermediate Workshop
Adventures in docker compose
docker compose
GDG Lima - Docker Compose
Introduction to Docker Compose

What's hot (20)

PDF
Docker compose
PDF
Rapid Development With Docker Compose
PDF
Build & Deploy Multi-Container Applications to AWS
PDF
Docker swarm reloaded
PPTX
Docker Compose | Docker Compose Tutorial | Docker Tutorial For Beginners | De...
PPTX
Docker Global Hack Day #3
PDF
Docker Intro
PPTX
Docker session IV: Docker Compose and Docker Swarm
PPTX
Containers #101 : Docker ONBUILD triggers and Introduction to Docker Compose
PDF
ContainerDayVietnam2016: Django Development with Docker
PDF
PPTX
Docker intro
PDF
Intro to Docker - London meetup oct. 2013
PDF
Docker Compose to Production with Docker Swarm
PPTX
Introduction to Docker - What is it and how is it compared to VM's
PDF
Docker with openstack
PDF
From Docker Run To Docker Compose
PDF
Introduction to docker
PPTX
Introduction to docker
PDF
Intro to Docker
Docker compose
Rapid Development With Docker Compose
Build & Deploy Multi-Container Applications to AWS
Docker swarm reloaded
Docker Compose | Docker Compose Tutorial | Docker Tutorial For Beginners | De...
Docker Global Hack Day #3
Docker Intro
Docker session IV: Docker Compose and Docker Swarm
Containers #101 : Docker ONBUILD triggers and Introduction to Docker Compose
ContainerDayVietnam2016: Django Development with Docker
Docker intro
Intro to Docker - London meetup oct. 2013
Docker Compose to Production with Docker Swarm
Introduction to Docker - What is it and how is it compared to VM's
Docker with openstack
From Docker Run To Docker Compose
Introduction to docker
Introduction to docker
Intro to Docker
Ad

Viewers also liked (10)

PPTX
Docker compose
PPTX
Pycon Australia 2015: Docker + Python
PPTX
Docker and the Container Ecosystem
PPTX
DockerCon EU 2015: The Missing Piece: when Docker networking unleashing soft ...
PDF
DockerCon EU 2015: Continuous Integration with Jenkins, Docker and Compose
PDF
Development Swarm Cluster
PPTX
Docker introduction
PPTX
Docker 101 - Nov 2016
PDF
Docker 101: Introduction to Docker
PPTX
Docker Online Meetup: Announcing Docker CE + EE
Docker compose
Pycon Australia 2015: Docker + Python
Docker and the Container Ecosystem
DockerCon EU 2015: The Missing Piece: when Docker networking unleashing soft ...
DockerCon EU 2015: Continuous Integration with Jenkins, Docker and Compose
Development Swarm Cluster
Docker introduction
Docker 101 - Nov 2016
Docker 101: Introduction to Docker
Docker Online Meetup: Announcing Docker CE + EE
Ad

Similar to Docker compose and swarm (20)

PPT
Docker_tech_guild ppt.ppt technical guild
PPTX
Introduction to Dockers and containers
PPTX
Docker - A Quick Introduction Guide
PPTX
Docker
PPTX
Docker toolbox
PPTX
Introduction to Docker by Techserverglobal
PPTX
Getting Started With Docker: Simplifying DevOps
PPTX
Introduction To Docker
PDF
Docker how to
PDF
Let's dockerize
PPTX
Working ,Introduction to Docker, Scope,,
PPTX
Introduction to Dockers.pptx
PPTX
Docker
PDF
Docker for Developers
PDF
containers and virtualization tools ( Docker )
PDF
Docker slides
PPTX
Docker with WordPress
PDF
Docker architecture-04-1
PDF
Docker: A New Way to Turbocharging Your Apps Development
PPTX
Docker Basic to Advance
Docker_tech_guild ppt.ppt technical guild
Introduction to Dockers and containers
Docker - A Quick Introduction Guide
Docker
Docker toolbox
Introduction to Docker by Techserverglobal
Getting Started With Docker: Simplifying DevOps
Introduction To Docker
Docker how to
Let's dockerize
Working ,Introduction to Docker, Scope,,
Introduction to Dockers.pptx
Docker
Docker for Developers
containers and virtualization tools ( Docker )
Docker slides
Docker with WordPress
Docker architecture-04-1
Docker: A New Way to Turbocharging Your Apps Development
Docker Basic to Advance

Recently uploaded (20)

PPTX
bas. eng. economics group 4 presentation 1.pptx
PDF
Arduino robotics embedded978-1-4302-3184-4.pdf
PDF
Structs to JSON How Go Powers REST APIs.pdf
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
DOCX
573137875-Attendance-Management-System-original
PPTX
Lesson 3_Tessellation.pptx finite Mathematics
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PDF
composite construction of structures.pdf
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
Welding lecture in detail for understanding
PPT
Project quality management in manufacturing
PPT
Mechanical Engineering MATERIALS Selection
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
bas. eng. economics group 4 presentation 1.pptx
Arduino robotics embedded978-1-4302-3184-4.pdf
Structs to JSON How Go Powers REST APIs.pdf
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Embodied AI: Ushering in the Next Era of Intelligent Systems
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
573137875-Attendance-Management-System-original
Lesson 3_Tessellation.pptx finite Mathematics
Model Code of Practice - Construction Work - 21102022 .pdf
Operating System & Kernel Study Guide-1 - converted.pdf
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
composite construction of structures.pdf
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Welding lecture in detail for understanding
Project quality management in manufacturing
Mechanical Engineering MATERIALS Selection
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx

Docker compose and swarm

  • 1. Docker Compose and Docker Swarm By Tanmay Mehra
  • 2. What is Docker ? Docker is an open platform for developing, shipping, and running applications. Docker provides a way to run almost any application securely isolated in a container. The isolation and security allow you to run many containers simultaneously on your host. The lightweight nature of containers, which run without the extra load of a hypervisor, means you can get more out of your hardware.
  • 3. Docker Components Docker: the open source container virtualization platform Docker Hub: SaaS platform for sharing and managing Docker images Docker Daemon runs on a host machine and does the heavy lifting of building, running, and distributing Docker containers. Docker client is a Docker binary that accepts commands from the user and communicates back and forth with daemon.
  • 4. How does it work ?
  • 5. Docker Demo Create docker-machine Pull an image Create a Container Start a container Stop and Remove a container
  • 6. Docker Compose Compose is a tool for defining and running complex applications with Docker. With Compose, you define a multi-container application in a single file, then spin your application up in a single command which does everything that needs to be done to get it running. Compose is great for development, testing, and staging environments, as well as CI workflows.
  • 7. How to use Docker Compose ? Define your app’s environment with a Dockerfile so it can be reproduced anywhere. Define the services that make up your app in docker- compose.yml so they can be run together in an isolated environment. Lastly, run docker-compose up and Compose will start and run your entire app.
  • 9. Docker Compose Demo Install docker compose Create a compose file docker-compose.yml docker-compose up check containers created check server up
  • 10. Docker Swarm Docker Swarm provides native clustering to Docker. It turns a pool of Docker hosts into a single, virtual Docker host. Docker Swarm solves one of the fundamental limitations of Docker where the containers could only run on a single Docker host.
  • 11. Docker Swarm Components like consul, zookeeper and etcd.
  • 12. Swarm Scheduling Strategies The Docker Swarm scheduler features multiple strategies for ranking nodes. The strategy you choose determines how Swarm computes ranking. spread: Swarm optimizes for the node with the least number of running containers binpack: The binpack strategy causes Swarm to optimize for the node which is most packed. random: The random strategy, like it sounds, chooses nodes at random regardless of their available CPU or RAM.
  • 13. Docker SwarmDemo Create Swarm manager Create Swarm nodes Join swarm nodes with Swarm manager Create containers using swarm manager Run the application