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

  • Online image building service for Arduino using Rails
  • Using the Docker REST API to run a container with parameters
  • Does Docker automate IP masquerade rules in iptables for bridge networks?
  • How to put docker container for database on a different host in production?
  • [Docker]: Connecting PHPMyAdmin to MySQL doesnt work
  • Docker & Excelsior JET
  • 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?

  • docker compose run with command error
  • Getting puppet error on docker ubuntu image
  • Class: Kitchen::ActionFailed - Test Kitchen + Docker + Remote API
  • django-coupons cannot import name 'patterns' in a dockerized django web app
  • Mounting nginx conf as a docker volume causes system error boot2docker
  • How to install docker version 1.13.1 on Ubuntu 14.04
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.