I have two containers that in one of them I am using gluster file system to mount the files that I need into mnt directory of my container and I'm using VOLUME /mnt
in my Dockerfile to share the volume.
I run this container with this:
docker run -d --cap-add SYS_ADMIN --device=/dev/fuse:/dev/fuse -e MOUNTPOINT="server1:test" -e TARGET="/mnt" --name gluster gluster-client
and I want to use this files in the second container that is a nginx container so I run this container using --volumes-from to use that shared volume, this is how I run my container:
docker run -it --volumes-from gluster nginx sh
my gluster container works fine, I mean I checked the mount directory(here /mnt) and I can see the files, but in second container that I'm usig docker --volumes-from there's no files in /mnt directory, it seems that it can mount the directory but not the files inside those directories,how can I fix it?, is it because I am using gluster or what?
gluster container is based on fedora and nginx container is based on alpine.
I appreciate your help:)