Skip to content

Instantly share code, notes, and snippets.

@brunneis
Last active January 9, 2018 17:25
Show Gist options
  • Save brunneis/21b76b47cfa5705923f56097a7e6a4d3 to your computer and use it in GitHub Desktop.
Save brunneis/21b76b47cfa5705923f56097a7e6a4d3 to your computer and use it in GitHub Desktop.
How to launch a Docker container where both the host and the container can share mounted volumes (i.e., loop devices) in a bound path. Share hotplug volumes with Docker.
#!/bin/bash
docker run -ti -v "$(pwd)"/shared_dir:/mnt/shared_dir:rw,shared --privileged ubuntu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment