Mounting multiple volumes on a docker container?

I know I can mount a directory in my host on my container using something like

docker run -t -i -v '/on/my/host:/on/the/container' ubuntu /bin/bash

Is there a way to create more than one host-container pair? e.g. a comma-separated list, or pass in an array?

  • Docker - Running Apache and Multiple JARs
  • Kafka in Kubernetes Cluster- How to publish/consume messages from outside of Kubernetes Cluster
  • docker-compose ignoring startup order established by depends_on
  • Fig kafka hostPort mapping
  • How to enable a Spark-Mesos job to be launched from inside a Docker container?
  • microsoft/iis docker cannot start a service
  • Building sphinx documents inside Docker container
  • unable to edit /etc/resolv.conf in docker container
  • Dockerfile for open-source project [duplicate]
  • “ No route to host” between two Docker Containers
  • docker-maven-plugin: How to define which tests are run for which image?
  • AWS ECS container exiting without specific reason
  • 2 Solutions collect form web for “Mounting multiple volumes on a docker container?”

    Pass multiple -v arguments.

    For instance:

    docker -v /on/my/host/1:/on/the/container/1 \
           -v /on/my/host/2:/on/the/container/2 \

    Or you can do

    docker run -v /var/volume1 -v /var/volume2 DATA busybox true
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.