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
16
votes
3 answers

Docker Macvlan network inside container is not reaching to its own host

I have setup Macvlan network between 2 docker host as follows: Host Setup: HOST_1 ens192: 172.18.0.21 Create macvlan bridge interface docker network create -d macvlan \ --subnet=172.18.0.0/22 \ --gateway=172.18.0.1 \ --ip-range=172.18.1.0/28 \ -o…
jlim
  • 909
  • 2
  • 12
  • 24
16
votes
1 answer

Gitlab 'Gateway Timeout' behind traefik proxy

So I'm trying to set up a gitlab-ce instance on docker swarm using traefik as reverse proxy. This is my proxy stack; version: '3' services: traefik: image: traefik:alpine command: --entryPoints="Name:http Address::80…
Ernest Okot
  • 880
  • 3
  • 8
  • 23
16
votes
2 answers

Docker services stops communicating after some time

I have together 6 containers running in docker swarm. Kafka+Zookeeper, MongoDB, A, B, C and Interface. Interface is the main access point from public - only this container publish the port - 5683. The interface container connects to A, B and C…
Ondrej Tomcik
  • 1,150
  • 9
  • 24
16
votes
2 answers

Why is kubernetes source code an order of magnitude larger than other container orchestrators?

Considering other orchestration tools like dokku, dcos, deis, flynn, docker swarm, etc.. Kubernetes is no where near to them in terms of lines of code, on an average those tools are around 100k-200k lines of code. Intuitively it feels strange that…
user3713466
  • 383
  • 1
  • 3
  • 11
15
votes
4 answers

Docker Swarm get real IP (client host) in Nginx

I have a stack with nginx and PHP to run on Docker Swarm Cluster. In a moment in my PHP application, I need to get the remote_addr ($_SERVER['REMOTE_ADDR']) which contains the real IP from the client host accessing my webapp. But the problem is that…
mayconfsbrito
  • 2,085
  • 4
  • 26
  • 45
15
votes
1 answer

Docker Swarm deploy - wait for service/container to be present

I have a working swarm setup and rolling-updates deployment. As i have to execute some tasks after deployment (like database migrations) i added a "manager" service to the stack. this service is limited to the node-manager - so i always have a way…
Rufinus
  • 29,200
  • 6
  • 68
  • 84
15
votes
3 answers

docker deploy won't publish port in swarm

I've got a swarm set up with a two nodes, one manager and one worker. I'd like to have a port published in the swarm so I can access my applications and I wonder how I achieve this. version: '2' services: server: build: . image:…
Oldek
  • 2,679
  • 5
  • 23
  • 25
15
votes
1 answer

docker-swarm and docker-compose how to dynamically add nodes and have them resolvable by the services

I have been playing with docker-compose and have cobbled together a project from the docker hub website. One thing that eludes me is how I can scale individual services up (by adding more instances) AND have existing instances somehow made aware of…
bryan hunt
  • 644
  • 4
  • 20
14
votes
3 answers

Get docker image digest / hash from within the container

I know it is possible to access the docker api and the following command works just fine: curl -s --unix-socket /var/run/docker.sock http:/v1.24/containers/$HOSTNAME/json | jq -r '.Image' However, I would really like avoid exposing the docker.sock…
tftd
  • 16,203
  • 11
  • 62
  • 106
14
votes
2 answers

Docker complains that bind source path doesn't exist, but it DOES

I'm trying to start a mysql container with a host directory mounted. I'm running a single-node swarm in Docker for AWS. But I can't mount a directory... This is the section of the docker-compose file I'm using: mysql: image: mysql-custom …
Scott Shorkey
  • 325
  • 4
  • 10
14
votes
3 answers

Log client's "real" IP address in Docker Swarm 1.12 when accessing a service

I have nginx container running as a service in Docker Swarm inside user created overlay network. Both created with: docker network create --driver overlay proxy docker service create --name proxy --network proxy -p 80:80 nginx When accessing nginx…
eskp
  • 193
  • 1
  • 7
14
votes
2 answers

Docker Swarm and Kubernetes Manager hardware requirements

We are planning to build a small docker cluster for our application services. We considered to use 2 master vms for ha, 1 consul(if we choose Swarm) and 5-10 hosts for containers. We have not yet decided what to use - Docker Swarm or Kubernetes. So…
aligin
  • 1,370
  • 1
  • 13
  • 18
13
votes
4 answers

Using Docker, what triggered PANIC: could not locate a valid checkpoint record

I am trying to understand Docker a little better, and in doing so, it appears I corrupted my PostgreSQL DB for my application. I am using Docker Swarm to start my application and I'm getting the following error in a loop in the PostgreSQL…
Awsmike
  • 751
  • 1
  • 7
  • 19
13
votes
5 answers

Remove sensitive information from environment variables in postgres docker container

I want to make a postgres database image but don't want to expose password and username which are stored as environment variable when produced using docker-compose.yml file. Basically, I don't want anyone to exec into the container and find out the…
13
votes
1 answer

If I run `docker-compose up` do I need a Dockerfile in the directory as well as a docker-compose.yml file?

Do I absolutely need to have a Dockerfile in my directory when using the command docker-compose up? I don't believe a Dockerfile is necessary but want to be sure. If I only have a docker-compose.yml file using pre-built images, there would be no…
Nick
  • 155
  • 2
  • 11