Docker Share Data Between Containers

I have 3 docker images and each one of them includes different dataset. I’m trying to create a volume and then mount those 3 dataset containers to that volume. Then bind a container created from an another major image and use those 3 separate datasets from same place (which is the major one).

Here is what filesystems of each of these three containers looks like:

container1: /datasets/xxx/01.jpg...
container2: /datasets/yyy/01.jpg...
container3: /datasets/zzz/01.jpg...

My docker command flow is looks like this:

docker volume create my-data
docker run -ti -d -v my-data:/datasets dataset/xxx:latest
docker run -ti -d -v my-data:/datasets dataset/yyy:latest
docker run -ti -d -v my-data:/datasets dataset/zzz:latest

And lastly, the major one:

docker run -ti -v my-data:/datasets major-application/app:latest

After these steps, when I do ls /datasets inside the container created from major-application image, I only see /datasets/xxx/01.jpg... directory. Also no luck with the --volumes-from command either. What am I missing here?

Source: StackOverflow