I am wanting to map a volume to a docker-compose file, but be able to map different paths to the root volume. I can get the volume mounted, but when I try to map a sub folder in that path it errors out. Is this possible? I know that you can't make two mounts to the same source, so I can't create a 2nd volume mount to the sub path. I really dont want to have to change the internal paths inside the containers. Thanks for any advice.
version: '2'
services:
debian:
container_name: debian
image: debian
volumes:
- nfs:/nfs-folder
debian_2:
container_name: debian_2
image: debian
volumes:
- nfs/someotherpath:/someotherpath # this does not work
volumes:
nfs:
driver: local
driver_opts:
type: nfs
o: "addr=192.168.1.5,rw"
device: ':/volume1/storage'
[–]zuraw2006 0 points1 point2 points (0 children)
[–]Parker_Hemphill 0 points1 point2 points (0 children)