I'm currently trying to make myself familiar with docker but encountered an issue by doing so. I'm trying to share a volume between two containers but I don't want them to put their files into the volumes root.
That's how it should look:
Container1: Mysql has to store /var/lib/mysql/* -> Volume1/mysql
Container2: Ngnix has to store /var/www/* -> Volume1/www
This is how it looks if the containers are created with:
-v Volume1:/var/lib/mysql/ -v Volume1:/var/www/ Container1: Mysql has to store /var/lib/mysql/* -> Volume1
Container2: Ngnix has to store /var/www/* -> Volume1
TLDR: I don't to create a volume for the sake of a single file but in order for that to be feasible I have to maintain order in the volume using directorys.