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
8
votes
1 answer

Microservices in practice

I have studied concept of microservices for a good while now, and understand what they are are and why they are necessary. Quick refresher In a nutshell, monolith application is decomposed into independent deployable units, each of which typically…
Tuomas Toivonen
  • 21,690
  • 47
  • 129
  • 225
8
votes
2 answers

Docker swarm with a custom network

I'm trying to work out how to properly use swarm mode in Docker. First I tried running containers on my 2 workers and manager machine without specifying a custom network (so I'm using the default ingress overlay network). However, If I use the…
Or Weinberger
  • 7,332
  • 23
  • 71
  • 116
8
votes
4 answers

How to find which node is the currently the manager node in docker swarm in a multiple swarm manager cluster?

I created a docker swarm cluster with 4 nodes out of it 2 is swarm manager (swarm supports multiple manager) I understand if the current manager node goes down then the second manager takes the role of being the swarm manager. In my case I am…
8
votes
2 answers

Database migrations in docker swarm mode

I have an application that consists of simple Node app and Mongo db. I wonder, how could I run database migrations in docker swarm mode? Without swarm mode I run migrations by stopping first the old version of application, running one-off migration…
ronkot
  • 5,915
  • 4
  • 27
  • 41
8
votes
5 answers

How to remove node from swarm?

I added three nodes to a swarm cluster with static file mode. I want to remove host1 from the cluster. But I don't find a docker swarm remove command: Usage: swarm [OPTIONS] COMMAND [arg...] Commands: create, c Create a cluster list, l List…
firelyu
  • 2,102
  • 5
  • 25
  • 29
8
votes
1 answer

How to set up Hadoop in Docker Swarm?

I would like to be able to start a Hadoop cluster in Docker, distributing the Hadoop nodes to the different physical nodes, using swarm. I have found the sequenceiq image that lets me run hadoop in a docker container, but this doesn't allow me to…
SGer
  • 544
  • 4
  • 18
7
votes
1 answer

docker container process running as non-root user cannot write to docker volume

TLDR everyone recommends processes within containers should never run as root (except for kubernetes) there doesn't seem to be a good devops/configuration-as-code approach to get the right owner/permissions set on docker volumes, so the (non-root)…
Chris Maes
  • 35,025
  • 12
  • 111
  • 136
7
votes
1 answer

How to find commit hash from within a running docker image

I currently build my images and tag them with the commit hash. I then pull this image and run it (either via the commit hash or the latest tag). How can I find out the commit hash from a running container ? All I currently know is the container…
maxisme
  • 3,974
  • 9
  • 47
  • 97
7
votes
2 answers

docker swarm not restarting unhealthy selenium hub containers

I have selenium grid deployed with docker swarm. docker-compose.yml version: '3.7' services: hub: image: selenium/hub:3.141.59-mercury ports: - "4444:4444" volumes: - /dev/shm:/dev/shm privileged: true environment: …
user1935987
  • 3,136
  • 9
  • 56
  • 108
7
votes
1 answer

Docker swarm worker behind NAT

I am wanting to have a worker node on a server I have that is behind a NAT (i.e can't expose ports publicly) I thought this wasn't a problem but it turns out to be one: On this server behind the NAT I run: docker swarm join --token SWMTKN-1...…
maxisme
  • 3,974
  • 9
  • 47
  • 97
7
votes
0 answers

Best Practices in Running DB Migrations in Docker Swarm?

I'm trying to figure out the best practice in running migrations in my swarm. I can't run standalone containers connected to an attachable network because container needs to access secrets which are only accessible with services. One scenario is to…
Nash
  • 73
  • 4
7
votes
1 answer

Using wildcard certificates in Traefik v2 on Docker Swarm

I am using the following Docker Compose file to deploy Traefik on a swarm cluster. version: "3.7" services: traefik: image: traefik:v2.1 command: - "--api.dashboard=true" - "--accesslog=true" - "--log.level=INFO" …
akrantz01
  • 628
  • 1
  • 9
  • 19
7
votes
1 answer

docker-swarm vs.docker-compose on single host in production

Is there a reason to use docker-swarm instead of docker-compose for deploying a single host in production? I'm currently rewriting an existing application. My predecessors set up the application using docker-swarm. But I do not understand why: the…
fradeco
  • 99
  • 6
7
votes
1 answer

network `hbase` is declared as external, but could not be found. You need to create a swarm-scoped network before the stack is deployed

I've below docker swarm cluster. $ sudo docker node ls ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS ENGINE VERSION iq7i01ns7ku7zrtaemiucoawi * master.com Ready …
user51
  • 8,843
  • 21
  • 79
  • 158
7
votes
1 answer

Connections not being closed(HikariCP, Postgres)

Env Spring Boot 2.1.2. 2 environments: local(postgres 11) and qa (docker swarm with postgres 10 and application) Problem After maxLifetime passes, hikari recreates connections(closes old ones and creating new ones), but on qa environment…
Flame239
  • 1,274
  • 1
  • 8
  • 20