Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/djmaze/docker-mounts
Mount devices inside a privileged Docker container
https://github.com/djmaze/docker-mounts
Last synced: about 1 month ago
JSON representation
Mount devices inside a privileged Docker container
- Host: GitHub
- URL: https://github.com/djmaze/docker-mounts
- Owner: djmaze
- Created: 2016-02-21T23:25:54.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-22T00:20:29.000Z (almost 9 years ago)
- Last Synced: 2024-12-08T20:41:20.158Z (about 2 months ago)
- Language: Shell
- Homepage: https://hub.docker.com/r/mazzolino/mounts/
- Size: 1000 Bytes
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Mount devices configured via environment variables into a (privileged) Docker container.
This is meant to be used as a [custom storage container](http://docs.rancher.com/os/configuration/storage/#custom-storage-container) for use with [RancherOS](https://github.com/rancher/os).
It is probably not useful for anything else.
## Usage
MOUNT=/dev/sda1
MOUNTPOINT=/mnt/disk
FSTYPE=btrfsdocker run --privileged --rm -v /lib/modules:/lib/modules:ro \
--device $MOUNT -v /:/mnt/host -e MOUNT_1=$MOUNT -e MOUNTPOINT_1=$MOUNTPOINT -e FSTYPE_1=$FSTYPE \
mazzolino/mountsYou can use `MOUNT_2`, `MOUNT_3` and so on in order to do multiple mounts.