mirror of
https://github.com/wsargent/docker-cheat-sheet.git
synced 2025-09-22 05:40:50 +02:00
Moved access to devices to a more appropiate section
This commit is contained in:
parent
5a6825705d
commit
ae49fa19d9
1 changed files with 16 additions and 14 deletions
30
README.md
30
README.md
|
@ -162,6 +162,22 @@ To mount a FUSE based filesystem, you need to combine both --cap-add and --devic
|
||||||
docker run --rm -it --cap-add SYS_ADMIN --device /dev/fuse sshfs
|
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)
|
||||||
|
|
||||||
|
|
||||||
### Info
|
### Info
|
||||||
|
|
||||||
* [`docker ps`](https://docs.docker.com/engine/reference/commandline/ps) shows running containers.
|
* [`docker ps`](https://docs.docker.com/engine/reference/commandline/ps) shows running containers.
|
||||||
|
@ -698,20 +714,6 @@ For all containers listed by image:
|
||||||
docker ps -a -f ancestor=ubuntu
|
docker ps -a -f ancestor=ubuntu
|
||||||
```
|
```
|
||||||
|
|
||||||
Give access to a single device:
|
|
||||||
|
|
||||||
```
|
|
||||||
docker run -t -i --device=/dev/ttyUSB0 debian bash
|
|
||||||
```
|
|
||||||
|
|
||||||
Give access to all devices:
|
|
||||||
|
|
||||||
```
|
|
||||||
docker run -t -i --privileged debian bash
|
|
||||||
```
|
|
||||||
more info about privileged containers [here](
|
|
||||||
https://docs.docker.com/engine/reference/run/#/runtime-privilege-and-linux-capabilities)
|
|
||||||
|
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue