It works, but all the files will be mixed together. This isn't really a problem, since if the container wants to access file_a
in volume1, and file_b
in volume2, then it will be able to do so no problem. The problem is when you have two different files named file_a
in the two different mount points in the container. In that case, one file will get overwritten by the other.
Just use separate volumes.