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

docker swarm: share a network between stacks without external

I am deploying multiple stacks on a Docker swarm with docker compose. Right now I have defined a network in my proxy stack compose file: networks: proxy: driver: overlay The other stacks reference this network the following way: networks: …
herm
  • 14,613
  • 7
  • 41
  • 62
10
votes
3 answers

How to maintain sticky session(session persistence) with docker swarm?

I have one Java based web application which is deployed in jboss-10.1.0(wildfly). I am using docker swarm mode(docker version 1.12.1) to scale my application everything works perfectly but the only issue I am facing is session management. Now let's…
10
votes
1 answer

Spring Cloud Netflix vs Kubernetes

I am trying to finally choose between Spring Cloud Netflix, Kubernetes and Swarm for building our microservices environment. They are all very cool and do some choice is very hard. I'll describe a little which kind of problems I want to solve. I…
10
votes
2 answers

Deploy a docker stack on one node (co-schedule containers like docker swarm)

I'm aware that docker-compose with docker-swarm (which is now legacy) is able to co-schedule some services on one node (using dependency filters such as link) I was wondering if this kind of co-scheduling is possible using modern docker engine swarm…
10
votes
3 answers

Is there any way to get logs in Docker Swarm?

I want to see the logs from my Docker Swarm service. Not only because I want all my logs to be collected for the usual reason, but also because I want to work out why the service is crashing with "task: non-zero exit (1)". I see that there is work…
Joe
  • 46,419
  • 33
  • 155
  • 245
10
votes
2 answers

Docker: Connecting to external database

I have hbase instance running which my app connects, We are planning to move the app into docker container but keep hbase running outside of docker. I could make the my app running in docker container connect to hbase by using add-host option while…
suresh
  • 2,365
  • 1
  • 26
  • 36
10
votes
1 answer

Passive replicas with Docker swarm mode

I'm trying to figure out a proper way to implement active/passive failover between replicas of service with Docker swarm mode. The service will hold a valuable in-memory state that cannot be lost, that's why I need multiple replicas of it. The…
felix-b
  • 8,178
  • 1
  • 26
  • 36
10
votes
2 answers

Is there a way to stop, start single task in docker swarm mode?

Is there a way to stop, start the single task in docker swarm mode, And how to do this?
sope
  • 1,619
  • 5
  • 19
  • 37
10
votes
1 answer

How to specify an iterator in the volume path when using docker-compose to scale up service?

Background: I'm using docker-compose in order to place a tomcat service into a docker swarm cluster but I'm presently struggling with how I would approach the logging directory given that I want to scale the service up yet retain the uniqueness of…
Snowy
  • 101
  • 4
9
votes
1 answer

Prometheus (Docker): determine available memory per node (which metric is correct?)

We have been struggling to create a good memory monitoring for our nodes running Docker components. We use Prometheus in combination with cadvisor and node_exporter. What is the best way to determine the used memory per node? Method 1: gives in…
tm1701
  • 7,307
  • 17
  • 79
  • 168
9
votes
2 answers

Docker traefik PathPrefix with StripPrefix Middleware always throws HTTP_502

I have a swarm service container, exposing port 5500. In the container, there is a web UI on https://localhost:5500/app. My service is called service1. I am using a traefik 2 proxy and I want the web UI of my service1 to be available on…
tigu
  • 731
  • 1
  • 7
  • 20
9
votes
1 answer

How to enable SYS_PTRACE for swarm container

I have an app running in a docker swarm on Linux. I need to attach a debugger (gdb) but I get the error: ptrace: Operation not permitted. Research leads me to use "cap_add", but this is not allowed for swam…
fishyjoes
  • 143
  • 1
  • 7
9
votes
1 answer

What's the difference between docker restart_policy on-failure vs any

In the docker swarm v3 docs, there are 3 different restart policy conditions that can be used. It's obvious what the none condition does, but I was wondering what the difference between on-failure and any is specifically. Here's a picture from the…
Alex J
  • 3,085
  • 3
  • 19
  • 29
9
votes
2 answers

Docker-compose: replace "build"-based service with pre-built image in production?

Let's say we have the following docker-compose.yml: version: '3' services: db: image: "postgres" ports: - "5432:5432" environment: - POSTGRES_PASSWORD=mysecretpassword web: build: web depends_on: [ db ] ports: …
Max
  • 9,220
  • 10
  • 51
  • 83
9
votes
4 answers

Docker Swarm host cannot resolve hosts on other nodes

I am following this very excellent tutorial: https://github.com/binblee/springcloud-swarm When I deploy a stack to a Docker swarm that contains a single node (just the manager node), it works perfectly. docker stack deploy -c all-in-one.yml…
simbro
  • 3,372
  • 7
  • 34
  • 46