Docker Mount an entire mounted host partition as a data volume

My system has two partitions:

5G main partition where Ubuntu is installed
100G side partition at /mnt/data that I’d like to use for Docker container as storage

  • Do I need to rebuild image when parent image is updated?
  • How to install pdo driver in php docker image?
  • Restarting machines in a docker swarm on AWS
  • Docker run command failing when trying to install the mysql php extension
  • How to build and run a java instance in Docker
  • Docker image before development or after? (Beginner)
  • for testing i was create also directory /tmp/mnt
    Also I put test file in both

    touch /tmp/mnt/file
    touch /mnt/data/file

    then I start docker images

    sudo docker run -it --rm -v /tmp/mnt:/var/data imagename bash
    sudo docker run -it --rm -v /mnt/data:/var/data imagename bash

    in image with /tmp/mnt I see /var/data/file, but in image with /mnt/data not

    both images show same outout for df -h /var/data

    Filesystem      Size  Used Avail Use% Mounted on
    /dev/xvda1      7.8G  5.1G  2.7G  66% /var/data

    Does it possible to mount separate partition into docker?

  • How to make docker container be notified when volume from another container was updated?
  • After deleting container from Azure Container Service agent, its website still available
  • docker jenkins dsl pipeline
  • Docker freezes even in a small setup
  • Docker: Logging From Both App and Server In One Container
  • Kitematic or other GUI based options to connect to a remote docker host
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.