Questions tagged [docker-swarm-mode]

Swarm mode refers to cluster management and orchestration features embedded in Docker Engine. When you initialize a new swarm (cluster) or join nodes to a swarm, the Docker Engine runs in swarm mode.

285 questions
105
votes
3 answers

When to use Docker-Compose and when to use Docker-Swarm

I'm trying to understand the differences or similarities between Docker-Compose and Docker-Swarm. By reading the documentation I have understood that docker-compose provides a mechanism to bind different containers together and work in…
Shabirmean
  • 2,341
  • 4
  • 21
  • 34
85
votes
2 answers

What's the difference between a stack file and a Compose file?

I'm learning about using Docker Compose to deploy applications in multiple containers, across multiple hosts. And I have come across two configuration files - stack file, and Compose file. From the Cloud stack file YAML reference, it states a stack…
dayuloli
  • 16,205
  • 16
  • 71
  • 126
54
votes
6 answers

How to directly mount NFS share/volume in container using docker compose v3

I have a compose file with v3 where there are 3 services sharing/using the same volume. While using swarm mode we need to create extra containers & volumes to manage our services across the cluster. I am planning to use NFS server so that single…
vivekyad4v
  • 13,321
  • 4
  • 55
  • 63
53
votes
4 answers

How to disable docker swarm mode?

I have enabled docker swarm for local testing. Now, whenever trying to deploy using docker-compose up I see the following warning: WARNING: The Docker Engine you're using is running in swarm mode. Compose does not use swarm mode to deploy services…
Datageek
  • 25,977
  • 6
  • 66
  • 70
35
votes
2 answers

How is load balancing done in Docker-Swarm mode

I'm working on a project to set up a cloud architecture using docker-swarm. I know that with swarm I could deploy replicas of a service which means multiple containers of that image will be running to serve requests. I also read that docker has an…
Shabirmean
  • 2,341
  • 4
  • 21
  • 34
29
votes
1 answer

What is overlay network and how does DNS resolution work?

I cannot connect to external mongodb server from my docker swarm cluster. As I understand this is because of cluster uses overlay network driver. Am I right? If not, how does docker overlay driver works and how can I connect to external mongodb…
Dmytro Nalyvaiko
  • 1,664
  • 4
  • 16
  • 27
25
votes
1 answer

How do networking and load balancer work in docker swarm mode?

I am new to Dockers and containers. I was going through the tutorials for docker and came across this information. https://docs.docker.com/get-started/part3/#docker-composeyml networks: - webnet networks: webnet: What is webnet? The…
SunilS
  • 2,030
  • 5
  • 34
  • 62
24
votes
2 answers

How to configure rabbitmq.config inside Docker containers?

I'm using the official RabbitMQ Docker image (https://hub.docker.com/_/rabbitmq/) I've tried editing the rabbitmq.config file inside the container after running docker exec -it /bin/bash However, this seems to have no effect on the…
AmazingBergkamp
  • 5,708
  • 4
  • 15
  • 24
23
votes
4 answers

How to fix this issue "no suitable node (scheduling constraints not satisfied on 1 node)" in docker swarm while deploying registry?

I have a docker swarm in a virtual machine with 2 core 4GB ram Centos. In the swarm when I deploy docker private registry (registry 2.6.4) it shows service status as pending forever. I used docker service ps <> And when i inspect…
Arul Ranjith
  • 465
  • 1
  • 5
  • 17
21
votes
3 answers

How to share volumes across multiple hosts in docker engine swarm mode?

Can we share a common/single named volume across multiple hosts in docker engine swarm mode, what's the easiest way to do it ?
vivekyad4v
  • 13,321
  • 4
  • 55
  • 63
20
votes
2 answers

What's the main advantage of using replicas in Docker Swarm Mode?

I'm struggling to understand the idea of replica instances in Docker Swarm Mode. I've read that it's a feature that helps with high availability. However, Docker automatically starts up a new task on a different node if one node goes down even with…
AmazingBergkamp
  • 5,708
  • 4
  • 15
  • 24
18
votes
2 answers

Automatic self-configuration of an etcd cluster as a Docker swarm service

I want to find a way to deploy an etcd cluster as a Docker Swarm service that would automatically configure itself without any interaction. Basically, I think of something in spirit of this command: docker service create --name etcd --replicas 3…
drdaeman
  • 11,159
  • 7
  • 59
  • 104
17
votes
3 answers

Host environment variables with docker stack deploy

I was wondering if there is a way to use environment variables taken from the host where the container is deployed, instead of the ones taken from where the docker stack deploy command is executed. For example imagine the following…
Alessandro Dionisi
  • 2,494
  • 4
  • 33
  • 37
17
votes
5 answers

How can I remotely connect to docker swarm?

Is it possible to execute commands on a docker swarm cluster hosted in cloud from my local mac? If yes, how? I want to execute command such as following on docker swarm from my local: docker create secret my-secret
docker…
Navdeep
  • 585
  • 2
  • 5
  • 17
14
votes
3 answers

How do I make nginx wait for my upstream service to start up in a Docker Swarm?

I deploy an nginx proxy service and a rails app service into a docker swarm. The nginx depends on the app in my docker-compose file. My nginx.conf file directs traffic to my upstream app service (exposed on port 3000) like so (only showing the…
Joerg
  • 3,553
  • 4
  • 32
  • 41
1
2 3
18 19