Created
April 15, 2019 12:56
-
-
Save indzi/b63ea2068ae08fbf9468b113b05f1504 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### Capabilities | |
Linux capabilities can be set by using `cap-add` and `cap-drop`. See <https://docs.docker.com/engine/reference/run/#/runtime-privilege-and-linux-capabilities> for details. This should be used for greater security. | |
To mount a FUSE based filesystem, you need to combine both --cap-add and --device: | |
``` | |
docker run --rm -it --cap-add SYS_ADMIN --device /dev/fuse sshfs | |
``` | |
Give access to a single device: | |
``` | |
docker run -it --device=/dev/ttyUSB0 debian bash | |
``` | |
Give access to all devices: | |
``` | |
docker run -it --privileged -v /dev/bus/usb:/dev/bus/usb debian bash | |
``` | |
More info about privileged containers [here]( | |
https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment