docker run
has a flag --volumes-from
which allows you to mount a volume from another container.
I see that people create a dedicate container just for the sake of providing a volume for another container. Is this an anti-pattern and the best-practice should be creating a named volume with docker volume create --name
?
Can someone shed some light on why creating a dedicate container just for the sake of volume can be beneficial? Could it be for the scenario when it's used in orchestration with Docker Machine/Docker Swarm/Kubernetes?