Questions tagged [docker-stack]

A Docker stack is a set of related services which share volumes, networks and other dependencies, and can be orchestrated and scaled together. "docker stack" is the command from the Docker CLI. Stacks are configured with docker-compose files but a docker stack is complete independent of docker compose.

187 questions
5
votes
2 answers

Docker Swarm error - invalid mount config for type

This is my Docker compose/stack file. When I deploy on a single node, everything works fine, but when I deploy on multiple nodes I get the following error: invalid mount config for type bind bind source path does not exist version: '3' services: …
Data Mastery
  • 1,555
  • 4
  • 18
  • 60
5
votes
0 answers

How to make a Docker VPN gateway for other Docker containers & stacks?

We are implementing a CI infrastructure as Docker stacks. Some of the containers in the stacks now need to access external services, only available through an OpenVPN connection, let's say on the 192.168.2.0/24 subnet. In order to keep containers as…
Ad N
  • 7,930
  • 6
  • 36
  • 80
5
votes
1 answer

Docker socket crash after stack up

I trying to deploy docker stack, that includes my development environment. But in random cases I have next error: > failed to create service < service_name >: Cannot connect to the > Docker daemon at unix:///var/run/docker.sock. Is the docker…
Sergey Bezugliy
  • 580
  • 7
  • 23
5
votes
3 answers

Connect to remote docker host / deploy a stack

I created a docker stack to deploy to a swarm. Now I´m a bit confused how the proper way looks like to deploy it to a real server? Of course I can scp my docker-stack.yml file to a node of my swarm ssh into the node run docker stack deploy -c…
pr177
  • 576
  • 7
  • 19
4
votes
1 answer

Multiple docker networks on a single container

I have a docker stack configuration with an overlay network called traefik. It contains my traefik reverse-proxy container and then several containers that serve various subdomains. I'm adding a new one that'll need to access a database server that…
xanderflood
  • 826
  • 2
  • 12
  • 22
4
votes
1 answer

Docker stack deploy doesn't pull all images

I am using docker for many different services and tools. I run a docker stack deploy -c docker-compose.yml --with-registry-auth stack_name. On the swarms themselves, only one or two of the nodes will have them images pulled and not on the others. I…
4
votes
1 answer

docker stack rm followed by deploy fails and runs on consecutive builds

Bash script in Jenkins build sections #!/bin/sh docker build -t smstake:latest . #Push to the private repository applying the proper tags for the image docker tag smstake:latest reg01.dev.01cloud.com:5000/smstake:1.0.1 docker push…
4
votes
1 answer

Creating new user beside root in docker-compose having connections issues

I am running a docker stack using the docker-compose . The docker-compose.yml looks something like below. The problem is if I add the default user root then it works fine but changing the user to another user say tara throws an error. I…
4
votes
2 answers

Docker: How to control/define default gateway settings

Can anyone shed some light on what is what with the Docker Compose YML file? All I want to do is to be able to control the IP addresses of the various containers. I am using version 3.1 (but also tried 3.3 as I recently upgraded to version 17.06). …
JoeG
  • 7,191
  • 10
  • 60
  • 105
3
votes
1 answer

"Error: couldn't add user" in MongoDB docker stack using a secrets file on Windows

While trying to run a MongoDB docker instance with authorization managed by docker-secrets (with files), inspired by this blog post, I kept running into the following error: 2020-07-24T16:25:26.656+0000 E QUERY [js] uncaught exception: Error:…
Sharkovsky87
  • 133
  • 9
3
votes
1 answer

docker stack deploy depends_on

Given compose file version: '3.8' services: whoami1: image: containous/whoami depends_on: - whoami2 whoami2: image: containous/whoami when deployed to docker swarm docker stack deploy -c docker-compose.yaml test services…
Ben
  • 3,989
  • 9
  • 48
  • 84
3
votes
1 answer

Docker Service in Swarm cannot connect to AWS RDS when a port is published

The company I'm working for recently decided to deploy a new application with docker swarm on AWS using EC2 instances. We set up a cluster of three EC2 instances as nodes (one manager, two workers) and we use stack to deploy the services. The…
3
votes
0 answers

Why docker not support the http api for docker stack?

I checked docker API doc:api/v1.40 and I couldn't find API support for docker stack stuff. After I googled it, I found these GitHub issues: Feature Req: docker stack deploy into API Roadmap for docker deploy and Bundles I still don't understand…
3
votes
1 answer

Docker container discovery by hostnames doesn't work

I use the following docker compose file located at /tmp/compose.yml for docker stack deployment : version: "3.6" services: service-A: image: service-A networks: - net hostname: "service-A-{{.Task.Slot}}" deploy: …
rok
  • 9,403
  • 17
  • 70
  • 126
3
votes
1 answer

Docker stack deploy using overlay network - inconsistent behavior

I am deploying 2 containers (application and SQL) to the same network using a docker-compose.yml file (Swarm stack deploy). Most of the time, the application has no problems talking to the SQL via its host name as a datasource in the connection…
Daniel Rahamim
  • 285
  • 2
  • 18
1 2
3
12 13