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
8
votes
4 answers

Docker Node is Down after service restart

It seems my server ran out of space and I was having some problems with some of the deployed docker stacks. Took me a while to figure it out, but eventually I did and removed a couple of containers and images to free some space. I was able to run…
Christopher Francisco
  • 15,672
  • 28
  • 94
  • 206
7
votes
1 answer

"docker stack deploy": where are docker images?

I created a docker compose *.yml file where I have many services with specified image tags. Then I let docker deploy a stack for me (on my local machine) with docker stack deploy -c .\my-compose-file.yml --with-registry-auth dev and it is able to…
Simon Achmüller
  • 1,096
  • 13
  • 26
7
votes
3 answers

On stack deploy, unable to pin image to digest: unauthorized: the client does not have permission for manifest

I'm running a Docker stack using a custom image which I have pushed to an Artifactory repository. docker-compose.yml: version: "3" services: app: image: repo.example.com/my_image:latest I can pull the image fine, and I can deploy the stack…
jpyams
  • 4,030
  • 9
  • 41
  • 66
7
votes
0 answers

Creation order of network<->service in docker stack

In docker-sompose: services: srvA: (..) networks: - backend srvB: (..) networks: - frontend networks: frontend: driver: overlay backend: driver: overlay when I start docker stack deploy -c docker-compose.yml…
mCs
  • 2,591
  • 6
  • 39
  • 66
7
votes
2 answers

How to change Docker stack restarting behaviour?

In our project we inherited Docker environment with some service stack in it. I've noticed Docker restarting stack once it faces memory limit. Unfortunately, I haven't found any info according to my questions on the Docker's website, so I'm asking…
tworogue
  • 389
  • 1
  • 6
  • 23
7
votes
1 answer

Mount tmpfs when using docker stack

When deploying a standalone container I can mount /dev/shm as a tmpfs with custom options as follows: docker run --name my-container -v /dev/shm --tmpfs /dev/shm:rw,nosuid,nodev,exec,size=90g my-image However, I cannot figure out how to do the same…
aht
  • 117
  • 1
  • 7
7
votes
1 answer

Stack service containers dynamic hostname

I am migrating away from Docker Cloud to pure Docker Swarm setup. One thing that I am missing is the nice way of how the containers got the hostname set as $SERVICE_NAME-$SLOT_NUMBER. Is it possible to dynamically set the hostname/container name in…
pjotr_dolphin
  • 1,207
  • 9
  • 34
7
votes
1 answer

Docker service laravel app not running when not running in manager node

docker-compose.yml This is my docker-compose file used to deploy the service in multiple instance using the docker-stack. As you can see the the app service which is the laravel running in 2 nodes and database (mysql) in one of the nodes. Full Code…
6
votes
2 answers

Volume mounting with docker stack

Following is my docker-stack file. version: "3" services: my-app: image: my-image:latest volumes: - ./certs:/certs ports: - 6401:6401 networks: my-net: ipv4_address:…
Niraj
  • 376
  • 4
  • 14
6
votes
0 answers

Docker stack deploy not deploying the images that is being build after code changes in repo

I have created jobs for build and deploy. The jobs are running perfectly without no errors and the project is deployed successfully. The problem is though the repository is changed the build is not showing up the changes when tested in the browser…
Tara Prasad Gurung
  • 3,422
  • 6
  • 38
  • 76
6
votes
1 answer

docker swarm list dependencies of a service

Let's say we have the following stack file: version: "3" services: ubuntu: image: ubuntu deploy: replicas: 2 restart_policy: condition: on-failure resources: limits: cpus: "0.1" memory:…
hichamx
  • 794
  • 3
  • 7
  • 18
6
votes
1 answer

Advantage of using docker-compose file version 3 over a shellscript?

My initial reason for creating a docker-compose.yml, was to take advantage of features such as build: and depends-on: to make a single file that builds all my images and runs them in containers. However, I noticed version 3 depreciates most of…
Will Parzybok
  • 2,764
  • 4
  • 12
  • 18
6
votes
1 answer

Simple docker containers: Build dedicated image or mount config as volume?

I'm putting together a docker-compose.yml file to run the multiple services for a project I'm working on. This project has a Magento and Wordpress website residing under the same domain, with that "same domain" aspect requiring a very simple nginx…
Rob Jackson
  • 138
  • 7
5
votes
1 answer

Docker compose healthcheck options

I'm trying to understand how the docker compose health check options work. healthcheck: interval: 1m30s timeout: 10s retries: 3 Would I be right in saying that this configuration will poll a container every 90 seconds, then if the container times…
h33
  • 1,104
  • 3
  • 16
  • 29
5
votes
0 answers

Docker Swarm update Service with host network

I have a docker swarm with currently just one node and a few stacks. To be able to get the ip-address of the client requesting one of my services I switched the port on one service to mode:host. This works fine except when I want to update that…
1
2
3
12 13