Can you please provide an example to sharing a path using volumes_from from container A to Container B, in addition how container B can access this path after sharing is done.
Thanks
Can you please provide an example to sharing a path using volumes_from from container A to Container B, in addition how container B can access this path after sharing is done.
Thanks
version: "3"
services:
web:
nginx:alpine
ports:
- "80:80"
postgres:
image: postgres:9.4
volumes:
- db-data:/var/lib/db
backup:
image: postgres:9.4
volumes:
- db-data:/var/lib/backup/data
redis:
image: redis
ports:
- "6379:6379"
volumes:
- ./data:/data
volumes:
db-data:
external: true
For me what solved was adding an external volume not created by compose using "external: true" https://docs.docker.com/compose/compose-file/compose-file-v3/#external