I’m defining services / networks / volumes in a v3 docker-compose format … volumes are of type “cloudstor:aws”. When the stack is deployed (
docker stack deploy -c docker-compose.yml <stack-name>) I expect to see the services mount the cloudstor volumes, no matter what node that service gets deployed to.
services: app: image: <my-registry>:<my-app> volumes: - "data_vol:/data" volumes: data_vol: external: name: "my_volume"
The cloudstor volume doesn’t get mounted on the node where the service is deployed (unless that node already has the plugin “loaded” / is the node where the volumes were created)
docker volume ls on the manager where I created the cloudstor volumes, lists the created volumes.
docker volume ls on a different manager, only shows local volumes … perhaps this is expected?
I have tried adding the “driver” option in the compose file:-
volumes: data_vol: driver: "cloudstor:aws" external: name: "my_volume"
Steps to reproduce the behavior
- Manager1: create a cloudstor volume
- create a stack (docker-compose v3 file, with volume reference) … and deploy the stack
- if it deploys to Manager1, it will work … if it deploys to Manager/Worker, it doesn’t
any pointers / embarrassingly obvious mistakes?