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
39
votes
7 answers

docker stack deploy results in "No such image error"

I am using docker swarm and would like to deploy a service with docker-compose. My service uses a custom image called myuser/myrepo:mytag that I successfully deploy to Docker-Hub to a private repository. My docker-compose looks like this: version:…
ice_chrysler
  • 2,633
  • 1
  • 21
  • 27
36
votes
1 answer

How to stop a deployed docker stack?

I just completed the beginners Docker tutorials and would like to know how to clean up. I deployed a stack and with a few different service using the below command: docker stack deploy --compose-file docker-stack.yml vote Is there away to stop all…
spw
  • 575
  • 2
  • 5
  • 8
34
votes
5 answers

Where to put the php artisan migrate command

Trying to deploy the laravel application on docker stack .What I am confused or not able to figure out is where can I run this php artisan migrate:fresh to generate the tables required in mysql. The services and the task are running…
Tara Prasad Gurung
  • 3,422
  • 6
  • 38
  • 76
33
votes
6 answers

Docker-compose.yml file that builds a base image, then children based on it?

For clarification, when I say base image, I mean the parent image that has all the common configurations, so that the children based on it don't need to download the dependencies individually. From my understanding, docker-compose.yml files are the…
Will Parzybok
  • 2,764
  • 4
  • 12
  • 18
26
votes
5 answers

Docker Swarms and Stacks: What's the difference?

I just read Docker's excellent Getting Started guide, and just wanted to confirm I understand the basic Docker parlance before I go much further. These definitions are somewhat provided in the docs, but a lot of those docs are example-based without…
smeeb
  • 27,777
  • 57
  • 250
  • 447
25
votes
4 answers

How to change the service name generated by Docker stack in docker-compose

When deploying a stack of this compose file using: docker stack deploy -c docker-compose.yml myapp service-name: image: service-image namelike-property: my-custom-service-name // here I would like to know the property The generated service…
Igor L.
  • 3,159
  • 7
  • 40
  • 61
23
votes
3 answers

Mixing named volumes and bind mounting in Docker?

How does mixing named volumes and bind mounts work? Using the following setup will the paths that are being bind mounted still be available inside the bind mount as they exist in the bind mount? /var/www/html/wp-content/uploads Using a separate…
PeaceBringer
  • 468
  • 4
  • 10
22
votes
1 answer

Getting invalid mount config for type "bind": bind source path does not exist in docker

I am trying to deploy following docker-compose into docker swarm cluster. version: '3.2' services: jenkins: image: jenkins/jenkins:lts ports: - 8080:8080 volumes: - ./data_jenkins:/var/jenkins_home deploy: mode:…
Tara Prasad Gurung
  • 3,422
  • 6
  • 38
  • 76
19
votes
2 answers

How to dynamically change the docker-compose image field

I have a docker-compose.yml something like bellow: networks: smstake: ipam: config: - subnet: 10.0.10.0/24 services: app: image: smstake:latest ports: - 8000:80 networks: …
19
votes
3 answers

How to update docker stack without restarting all services

I have a swarm cluster wherein different technology dockers are deployed. (Zookeeper, Kafka, Elastic, Storm and custom web application) Web application goes under tremendous changes and have to update the stack everytime web docker changes. Once in…
Sunil Agarwal
  • 4,097
  • 5
  • 44
  • 80
13
votes
2 answers

Docker Stack tasks Rejected because of Permission denied error

I tried to deploy a stack (contains one service) with docker stack deploy command and run 2 instance from my application on swarm! here is my docker-compose file: version: "3" services: server: image: makbn/thumbnailer-server:v1 deploy: …
13
votes
2 answers

Adding a service to a stack after the stack has been deployed

I’m trying to add a service to a stack after the stack was already deployed. But this new service is having trouble communicating with services (redis) inside the stack. This is my current understanding of stacks and services, please let me know if…
12
votes
3 answers

How can I update the latest image that my docker service/stack uses?

In the .yml definition, I'm always pulling the latest image of my service. When I push a new image to the registry and I want to update the image that the service in my stack uses. I don't see any --pull flag, and the documentation for docker…
Christopher Francisco
  • 15,672
  • 28
  • 94
  • 206
11
votes
1 answer

Docker Swarm Mode Error: Joining Two Workers To One Manager

I'm having difficulty setting up a Docker Swarm with two workers and one manager. Everything works fine until I add the second worker. After adding the second worker, the first worker's daemon enters some sort of error state where a simple docker…
10
votes
5 answers

Docker Swarm with image versions externalized to .env file

I used to externalized my image versions to my .env file. This make it easy to maintain and I don't modify my docker-compose.yml file just to upgrade a version, so I'm sure I won't delete a line by mistake or whatever. But when I try to deploy my…
Olivier
  • 1,982
  • 3
  • 23
  • 36
1
2 3
12 13