SlideShare a Scribd company logo
Authored by Sangtong Peesing
Docker Products
• Docker Engine is an open source containerization technology for building and
containerizing your applications.
• Docker Desktop is an easy-to-install application for Mac or Windows environment that can
build and share containerized applications and microservices. Docker Desktop
includes Docker Engine, Docker CLI client, Docker Compose, Notary, Kubernetes,
and Credential Helper.
• Docker Compose is a tool for defining and running multi-container Docker applications.
• Docker Hub is a public registry that anyone can use.
• Docker Swarm is a cluster manager of Docker Engines.
• Docker Machine is a tool that lets you install Docker Engine on one or more virtual hosts.
Docker Engine
Docker Engine
Docker architecture (1/2)
• Docker Daemon (dockerd) listens for Docker API requests and manages
Docker objects.
• Docker Client (docker) is the primary way that many Docker users interact
with Docker. The docker command uses the Docker API.
• Docker Registry stores Docker images. Docker is configured to look for
images on Docker Hub by default.
• Docker Objects such as images, containers, networks, and volumes.
Docker Architecture (2/2)
Docker Objects
Docker Objects Description
images An image is a read-only template with instructions for creating a Docker container.
containers A container is a runnable instance of an image. When a container is removed, any
changes to its state that are not stored in persistent storage disappear.
networks A network connects docker containers and services together.
volumes Volumes are the preferred mechanism for persisting data generated by and used by
Docker containers.
Volumes
Volume Types
• Volumes are the best way to persist data in Docker.
• Bind mounts should be only used in development environments.
• tmpfs mounts are only stored in the host system’s memory.
Docker Commands
Command Description
docker image Manage images.
docker container Manage containers.
docker run Run a command in a new container.
docker exec Run a command in a running container.
docker volume Manage volumes.
docker network Manage networks.
docker logs Fetch logs of a container.
Docker Swarm
Docker Swarm
• A node is an instance of Docker Engine. We can run one or more nodes on
a single physical computer or a cloud server.
• A swarm consists of multiple Docker nodes which run in swarm mode and
act as managers and workers.
• A task is a running container which is part of a swarm service and managed
by a swarm manager, as opposed to a standalone container.
Swarm Mode
Manager Nodes
• Manager nodes handle cluster management tasks:
• Maintaining a cluster state.
• Scheduling services.
• Serving swarm mode HTTP API endpoints.
• To take advantage of swarm mode’s fault-tolerance features, we can have multiple
manager nodes to recover from the failure of a manager node without downtime.
• An N manager cluster tolerates the loss of at most (N-1)/2 managers.
• Docker recommends a maximum of seven manager nodes for a swarm.
Swarm Management Commands
Command Description
docker swarm Manage swarm mode.
docker node Manage Docker Swarm nodes.
docker service Manage Docker Swarm services.
docker stack Manage stacks of Docker Swarm services.
Docker Machine
Docker Machine (1/2)
Docker Machine is a tool that lets you install Docker Engine on one or
more virtual hosts and manage the hosts with docker-machine commands.
Docker Machine (2/2)
Docker Machine Installation
1. Run the command below with Git Bash program.
$ if [[ ! -d "$HOME/bin" ]]; then mkdir -p "$HOME/bin"; fi 
&& base=https://github.com/docker/machine/releases/download/v0.16.2 
&& curl -L $base/docker-machine-Windows-x86_64.exe > "$HOME/bin/docker-machine.exe" 
&& chmod +x "$HOME/bin/docker-machine.exe"
2. Check the installation by displaying the Docker Machine version.
$ docker-machine version
Create an external virtual switch. (1/3)
Create an external virtual switch. (2/3)
Create an external virtual switch. (3/3)
Create Docker hosts.
docker-machine create 
--driver <driver name> 
--hyperv-virtual-switch <Hyper-V external virtual switch name> 
--hyperv-memory <size of memory in MB> 
<machine name>
docker-machine create 
--driver hyperv 
--hyperv-virtual-switch "External Virtual Switch" 
--hyperv-memory 768 
worker1
List all Docker hosts.
$ docker-machine ls
Swarm Cluster
Create a swarm.
$ docker-machine ssh <Docker hostname>
$ docker swarm init --advertise-addr <Docker manager node IP address>
Add a worker node to the swarm.
Add a manager node to the swarm.
Swarm Nodes
List all Docker Swarm nodes.
AVAILABILITY
• Active means that the scheduler can assign tasks to the node.
• Pause means that the scheduler does not assign new tasks to the node, but
existing tasks remain running.
• Drain means that the scheduler does not assign new tasks to the node. The
scheduler shuts down any existing tasks and schedules them on an available
node.
MANAGER STATUS
• No value indicates a worker node that does not participate in swarm management.
• Leader means that the node is the primary manager node that makes all swarm
management and orchestration decisions for the swarm.
• Reachable means that the node is a manager node participating in the Raft
consensus quorum. If the leader node becomes unavailable, the node is eligible for
election as the new leader.
• Unavailable means that the node is a manager that cannot communicate with other
managers. If a manager node becomes unavailable, you should either join a new
manager node to the swarm or promote a worker node to be a manager.
Service Deployment
Deploy a service in the swarm.
$ docker service create --name <service name> <image name> [command] [arguments…]
Scale the service in the swarm.
$ docker service scale <service name>=<number of tasks>
Delete the service running in the swarm.
$ docker service rm <service name>
Stack Deployment
Stack Deployment Example
$ docker stack deploy --compose-file <compose file path> <stack name>
Troubleshooting
Troubleshoot your network problems. (1/5)
If you face some network problems, for example, your machine state is
timeout.
Troubleshoot your network problems. (2/5)
These are steps that you can follow.
1. Check your machine problem with docker-machine env <machine name>
command.
2. In this example, you face a problem with your network certificates and the system
recommend that you can attempt to regenerate your network certificates.
Troubleshoot your network problems. (3/5)
3. In this case, I recommend that you should restart your machine(s) first with
docker-machine restart <machine name(s)> command.
Troubleshoot your network problems. (4/5)
4. And then regenerate your network certificates with
docker-machine regenerate-certs <machine name(s)> command.
Troubleshoot your network problems. (5/5)
5. Check your machine state again.
Thank you

More Related Content

PPTX
Docker 101 : Introduction to Docker and Containers
PDF
Docker Introduction
PPTX
Getting started with Docker
PDF
Docker Introduction
PPTX
Docker intro
PPTX
What is Docker
PPTX
Docker introduction (1)
PPTX
Docker: From Zero to Hero
Docker 101 : Introduction to Docker and Containers
Docker Introduction
Getting started with Docker
Docker Introduction
Docker intro
What is Docker
Docker introduction (1)
Docker: From Zero to Hero

What's hot (20)

PPT
Docker introduction
PDF
Docker in real life
PPTX
Introduction to Docker
PDF
Introduction to Docker - VIT Campus
PPTX
Introduction to Docker - 2017
PDF
Introduction to Docker
PDF
Introduction to docker
PPTX
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
PPTX
Docker introduction for the beginners
PDF
Introduction to Docker
PPTX
Docker 101 - High level introduction to docker
PPTX
Docker introduction &amp; benefits
PPTX
Docker Basics
PDF
Docker architecture-04-1
PPTX
Intro to docker
PPT
presentation on Docker
PDF
Docker 101: Introduction to Docker
PPTX
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...
PDF
Introduction to container based virtualization with docker
Docker introduction
Docker in real life
Introduction to Docker
Introduction to Docker - VIT Campus
Introduction to Docker - 2017
Introduction to Docker
Introduction to docker
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
Docker introduction for the beginners
Introduction to Docker
Docker 101 - High level introduction to docker
Docker introduction &amp; benefits
Docker Basics
Docker architecture-04-1
Intro to docker
presentation on Docker
Docker 101: Introduction to Docker
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...
Introduction to container based virtualization with docker
Ad

Similar to Docker (20)

PPTX
Docker toolbox
PPTX
Introduction To Docker
PPTX
Docker-Presentation.pptx
PPTX
Everything you need to know about Docker
PPTX
Docker-machine
PDF
Up and running with docker
PPTX
Getting Started With Docker: Simplifying DevOps
PDF
Dockers & kubernetes detailed - Beginners to Geek
PDF
containers and virtualization tools ( Docker )
PDF
PDF
Introduction to Docker and Monitoring with InfluxData
PDF
DockerCC.pdf
PPTX
Introduction to Dockers and containers
PDF
Docker fundamentals
PDF
Docker: A New Way to Turbocharging Your Apps Development
PDF
Docker Essentials Workshop— Innovation Labs July 2020
PPTX
Docker
PPTX
Primi passi con Docker - ItalianCoders - 12-01-2021
PDF
Intersog Hack_n_Tell. Docker. First steps.
POTX
Deploying .net core apps to Docker - dotnetConf Local Bengaluru
Docker toolbox
Introduction To Docker
Docker-Presentation.pptx
Everything you need to know about Docker
Docker-machine
Up and running with docker
Getting Started With Docker: Simplifying DevOps
Dockers & kubernetes detailed - Beginners to Geek
containers and virtualization tools ( Docker )
Introduction to Docker and Monitoring with InfluxData
DockerCC.pdf
Introduction to Dockers and containers
Docker fundamentals
Docker: A New Way to Turbocharging Your Apps Development
Docker Essentials Workshop— Innovation Labs July 2020
Docker
Primi passi con Docker - ItalianCoders - 12-01-2021
Intersog Hack_n_Tell. Docker. First steps.
Deploying .net core apps to Docker - dotnetConf Local Bengaluru
Ad

Recently uploaded (20)

DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
Big Data Technologies - Introduction.pptx
PDF
Encapsulation theory and applications.pdf
PDF
KodekX | Application Modernization Development
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Machine learning based COVID-19 study performance prediction
PPTX
A Presentation on Artificial Intelligence
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Modernizing your data center with Dell and AMD
The AUB Centre for AI in Media Proposal.docx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Big Data Technologies - Introduction.pptx
Encapsulation theory and applications.pdf
KodekX | Application Modernization Development
Encapsulation_ Review paper, used for researhc scholars
Building Integrated photovoltaic BIPV_UPV.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
Mobile App Security Testing_ A Comprehensive Guide.pdf
Machine learning based COVID-19 study performance prediction
A Presentation on Artificial Intelligence
NewMind AI Monthly Chronicles - July 2025
Review of recent advances in non-invasive hemoglobin estimation
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
The Rise and Fall of 3GPP – Time for a Sabbatical?
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Modernizing your data center with Dell and AMD

Docker

  • 2. Docker Products • Docker Engine is an open source containerization technology for building and containerizing your applications. • Docker Desktop is an easy-to-install application for Mac or Windows environment that can build and share containerized applications and microservices. Docker Desktop includes Docker Engine, Docker CLI client, Docker Compose, Notary, Kubernetes, and Credential Helper. • Docker Compose is a tool for defining and running multi-container Docker applications. • Docker Hub is a public registry that anyone can use. • Docker Swarm is a cluster manager of Docker Engines. • Docker Machine is a tool that lets you install Docker Engine on one or more virtual hosts.
  • 5. Docker architecture (1/2) • Docker Daemon (dockerd) listens for Docker API requests and manages Docker objects. • Docker Client (docker) is the primary way that many Docker users interact with Docker. The docker command uses the Docker API. • Docker Registry stores Docker images. Docker is configured to look for images on Docker Hub by default. • Docker Objects such as images, containers, networks, and volumes.
  • 7. Docker Objects Docker Objects Description images An image is a read-only template with instructions for creating a Docker container. containers A container is a runnable instance of an image. When a container is removed, any changes to its state that are not stored in persistent storage disappear. networks A network connects docker containers and services together. volumes Volumes are the preferred mechanism for persisting data generated by and used by Docker containers.
  • 9. Volume Types • Volumes are the best way to persist data in Docker. • Bind mounts should be only used in development environments. • tmpfs mounts are only stored in the host system’s memory.
  • 10. Docker Commands Command Description docker image Manage images. docker container Manage containers. docker run Run a command in a new container. docker exec Run a command in a running container. docker volume Manage volumes. docker network Manage networks. docker logs Fetch logs of a container.
  • 12. Docker Swarm • A node is an instance of Docker Engine. We can run one or more nodes on a single physical computer or a cloud server. • A swarm consists of multiple Docker nodes which run in swarm mode and act as managers and workers. • A task is a running container which is part of a swarm service and managed by a swarm manager, as opposed to a standalone container.
  • 14. Manager Nodes • Manager nodes handle cluster management tasks: • Maintaining a cluster state. • Scheduling services. • Serving swarm mode HTTP API endpoints. • To take advantage of swarm mode’s fault-tolerance features, we can have multiple manager nodes to recover from the failure of a manager node without downtime. • An N manager cluster tolerates the loss of at most (N-1)/2 managers. • Docker recommends a maximum of seven manager nodes for a swarm.
  • 15. Swarm Management Commands Command Description docker swarm Manage swarm mode. docker node Manage Docker Swarm nodes. docker service Manage Docker Swarm services. docker stack Manage stacks of Docker Swarm services.
  • 17. Docker Machine (1/2) Docker Machine is a tool that lets you install Docker Engine on one or more virtual hosts and manage the hosts with docker-machine commands.
  • 19. Docker Machine Installation 1. Run the command below with Git Bash program. $ if [[ ! -d "$HOME/bin" ]]; then mkdir -p "$HOME/bin"; fi && base=https://github.com/docker/machine/releases/download/v0.16.2 && curl -L $base/docker-machine-Windows-x86_64.exe > "$HOME/bin/docker-machine.exe" && chmod +x "$HOME/bin/docker-machine.exe" 2. Check the installation by displaying the Docker Machine version. $ docker-machine version
  • 20. Create an external virtual switch. (1/3)
  • 21. Create an external virtual switch. (2/3)
  • 22. Create an external virtual switch. (3/3)
  • 23. Create Docker hosts. docker-machine create --driver <driver name> --hyperv-virtual-switch <Hyper-V external virtual switch name> --hyperv-memory <size of memory in MB> <machine name> docker-machine create --driver hyperv --hyperv-virtual-switch "External Virtual Switch" --hyperv-memory 768 worker1
  • 24. List all Docker hosts. $ docker-machine ls
  • 26. Create a swarm. $ docker-machine ssh <Docker hostname> $ docker swarm init --advertise-addr <Docker manager node IP address>
  • 27. Add a worker node to the swarm.
  • 28. Add a manager node to the swarm.
  • 30. List all Docker Swarm nodes.
  • 31. AVAILABILITY • Active means that the scheduler can assign tasks to the node. • Pause means that the scheduler does not assign new tasks to the node, but existing tasks remain running. • Drain means that the scheduler does not assign new tasks to the node. The scheduler shuts down any existing tasks and schedules them on an available node.
  • 32. MANAGER STATUS • No value indicates a worker node that does not participate in swarm management. • Leader means that the node is the primary manager node that makes all swarm management and orchestration decisions for the swarm. • Reachable means that the node is a manager node participating in the Raft consensus quorum. If the leader node becomes unavailable, the node is eligible for election as the new leader. • Unavailable means that the node is a manager that cannot communicate with other managers. If a manager node becomes unavailable, you should either join a new manager node to the swarm or promote a worker node to be a manager.
  • 34. Deploy a service in the swarm. $ docker service create --name <service name> <image name> [command] [arguments…]
  • 35. Scale the service in the swarm. $ docker service scale <service name>=<number of tasks>
  • 36. Delete the service running in the swarm. $ docker service rm <service name>
  • 38. Stack Deployment Example $ docker stack deploy --compose-file <compose file path> <stack name>
  • 40. Troubleshoot your network problems. (1/5) If you face some network problems, for example, your machine state is timeout.
  • 41. Troubleshoot your network problems. (2/5) These are steps that you can follow. 1. Check your machine problem with docker-machine env <machine name> command. 2. In this example, you face a problem with your network certificates and the system recommend that you can attempt to regenerate your network certificates.
  • 42. Troubleshoot your network problems. (3/5) 3. In this case, I recommend that you should restart your machine(s) first with docker-machine restart <machine name(s)> command.
  • 43. Troubleshoot your network problems. (4/5) 4. And then regenerate your network certificates with docker-machine regenerate-certs <machine name(s)> command.
  • 44. Troubleshoot your network problems. (5/5) 5. Check your machine state again.