Questions tagged [docker-swarm]

Docker Swarm is native clustering for Docker. It turns a pool of Docker hosts into a single, virtual host.

Docker Swarm is native clustering for Docker. It turns a pool of Docker hosts into a single, virtual host.

Swarm serves the standard Docker API, so any tool which already communicates with a Docker daemon can use Swarm to transparently scale to multiple hosts: Dokku, Compose, Krane, Flynn, Deis, DockerUI, Shipyard, Drone, Jenkins... and, of course, the Docker client itself.

Like other Docker projects, Swarm follows the "batteries included but removable" principle. It ships with a set of simple scheduling backends out of the box, and as initial development settles, an API will be developed to enable pluggable backends. The goal is to provide a smooth out-of-the-box experience for simple use cases, and allow swapping in more powerful backends, like Mesos, for large scale production deployments.

3165 questions
19
votes
2 answers

How do I find out why my Docker service is in Pending state?

I'm playing Docker Swarm, and using a docker-compose.yml with docker deploy. All services get deployed except for one, which stays in Pending state. I have added a constraint that ties this service to one of the nodes. My question is not so much…
raarts
  • 2,711
  • 4
  • 25
  • 45
19
votes
2 answers

Shell into swarm container

I'm unable to connect to a container that's running on a swarm. Seems like the following doesn't work: docker exec -it bash Here is some output: >$ docker service ls ID NAME REPLICAS IMAGE …
Andi Jay
  • 5,882
  • 13
  • 51
  • 61
19
votes
2 answers

can we deploy a container into a specific node in a docker swarm

I have a docker swarm cluster, it contains 1 master 3 nodes. When we deploy a container through swarm master, e.g with the below command docker -H tcp://:5001 run -dt --name swarm-test busybox /bin/sh Swarm will auto pick a node and…
jojo
  • 13,583
  • 35
  • 90
  • 123
18
votes
6 answers

Docker container not starting giving "OCI runtime create failed"

I have installed the Docker version 17.12.0-ce, build c97c6d6 When I try to start any container it gives the following error docker: Error response from daemon: OCI runtime create failed: unable to retrieve OCI runtime error (open…
vhashmode
  • 221
  • 1
  • 2
  • 8
17
votes
3 answers

Docker Swarm - network sandbox join failed: subnet sandbox join failed for "10.0.0.0/24": error creating vxlan interface: file exists

I met this issue when deploying my application on Docker Swarm. I run docker stack deploy -c /path and get error network sandbox join failed: subnet sandbox join failed for "10.0.0.0/24": error creating vxlan interface: file exists I searched too…
17
votes
6 answers

Difference between Minikube, Kubernetes, Docker Compose, Docker Swarm, etc

I am new to cluster container management, and this question is the basis for all the freshers over here. I read some documentation, but still, my understanding is not too clear, so any leads.. helping to understand? Somewhere it is mentioned,…
stackjohnny
  • 645
  • 3
  • 7
  • 22
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
2 answers

Pros and Cons of running all Docker Swarm nodes as Managers?

I am considering building out a Docker Swarm cluster. For the purpose of keeping things both simple and relatively fault-tolerant, I thought about simply running 3 nodes as managers. What are the trade-offs when not using any dedicated worker nodes?…
Kurtis
  • 1,599
  • 1
  • 16
  • 30
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
17
votes
2 answers

The relation between "docker/swarm" and "docker/swarmkit"

I am already familiar with docker/swarm, but find there occurs a "new" project: docker/swarmkit. But unfortunately, after reading the README, I still can't figure out what is the function of docker/swarmkit. Could anyoone help to elaborate the…
Nan Xiao
  • 16,671
  • 18
  • 103
  • 164
16
votes
6 answers

exit code 14 error in mongodb container, I'm using mongodb container with with volume path then received exit code 14 error

version: "3" services: mongo: image: mongo working_dir: /c/data/ ports: - 27017:27017 deploy: replicas: 1 volumes: - /c/data/:/data/db I am tried that above stack file and I'm receiving exit…
yasar khan
  • 171
  • 1
  • 1
  • 4
16
votes
0 answers

Docker swarm restart all containers on host periodically

I have next dmesg log [Fri Jan 17 07:22:25 2020] [UFW BLOCK] IN=enp6s0 OUT= MAC=00:25:90:66:ab:2c:cc:4e:24:f9:de:60:08:00 SRC=185.176.27.162 DST=91.237.249.65 LEN=40 TOS=0x00 PREC=0x00 TTL=246 ID=34473 PROTO=TCP SPT=42928 DPT=4443 WINDOW=1024…
Ryabchenko Alexander
  • 10,057
  • 7
  • 56
  • 88
16
votes
1 answer

Passing aws credentials to Docker

I have a docker container golang code which interacts with aws resources. In the testing environment, we use iam role. But How do I test locally. How to use aws credentials to run my docker locally.I am using docker file to build the docker image.
16
votes
2 answers

Why do I need to be in Swarm mode to use Docker secrets?

I am playing around with a single container docker image. I would like to store my db password as a secret without using compose (having probs with that and Gradle for now). I thought I could still use secrets even without compose but when I try I…
Jackie
  • 21,969
  • 32
  • 147
  • 289
16
votes
1 answer

Best practices to run cron job from a docker stack

here is the thing: I have a stack where a node js backend sends messages to a queue and perl workers (cron jobs) consume messages from that queue. I already "dockerized" the node js backend but now I'm trying to do the same with the Perl…
the_ccalderon
  • 2,006
  • 2
  • 13
  • 24