Docker Community Forums

Share and learn in the Docker community.

How to share volumes?

Guys

I have a docker composing 1.11.1 and a docker 1.13.

I set up docker-compose.yml but I need my volume to be shared between the nodes.

I declare the volume only that it goes blank.

Docker-compose.yml

Version: “3”

Services:

Nginx:
Image: pag-nginx: 1.0
Ports:
- "80:80"
Deploy:
Mode: replicated
Replies: 2

Placement:

Constraints:

- node.role == worker

 Environment:
   TZ: America / Sao_Paulo
 Depends_on:
   - php

Php:
Image: php: 5-fpm
Environment:
TZ: America / Sao_Paulo
volumes:
- app: / app: rw
Deploy:
Mode: replicated
Replies: 2

Placement:

Constraints:

- node.role == manager

volumes:
app:

node-01# ls app /
Nginx

Has anyone ever experienced this ??