Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save StudioEtrange/1713f4a9204b2a79d0418b88efba2c63 to your computer and use it in GitHub Desktop.

Select an option

Save StudioEtrange/1713f4a9204b2a79d0418b88efba2c63 to your computer and use it in GitHub Desktop.
docker : bind mount and docker volume equivalent
  • BIND MOUNT INSIDE CONTAINER
docker run -v /path/on/host:/data busybox ls /data
  • Equivalent way but managed with "docker volume" - This do not work with file, only with directory
docker volume create --opt type=none --opt device=/path/on/host --opt o=bind my_vol
docker run -v my_vol:/data busybox ls /data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment