If you explicitly mount a volume or host directory with
docker run -v on the exact same path, you get to choose the name. If you need Docker to create the volume with the contents specified in the Dockerfile, it must be a named volume and it must not exist before the
docker run invocation (don’t manually
docker volume create it) (see here).
docker run --volumes-from will mount all of the volumes from one container into another on the exact same path; but you don’t have a whole lot of control over how it works, and you still need to know the other container’s name or ID. It’s probably easier to explicitly specify volume names or paths.
As a general design question, multi-container Docker setups tend to be happier if they can communicate with each other over the network rather than by sharing files. This isn’t always a practical answer, but if you’re building new services and one is sending data to another, building a small HTTP service tends to work better within Docker than trying to use a shared volume.