mirror of
https://github.com/wsargent/docker-cheat-sheet.git
synced 2025-09-22 05:40:50 +02:00
docs(zh-cn): Moved access to devices to a more appropiate section
- Moved access to devices to a more appropiate section - Access to devices
This commit is contained in:
parent
1f3819bc5e
commit
1d66acdc81
1 changed files with 14 additions and 0 deletions
|
@ -162,6 +162,20 @@ Linux 的 capability 可以通过使用 `cap-add` 和 `cap-drop` 设置。请参
|
|||
docker run --rm -it --cap-add SYS_ADMIN --device /dev/fuse sshfs
|
||||
```
|
||||
|
||||
授予对单个设备访问权限:
|
||||
|
||||
```
|
||||
docker run -it --device=/dev/ttyUSB0 debian bash
|
||||
```
|
||||
|
||||
授予所有设备访问权限:
|
||||
|
||||
```
|
||||
docker run -it --privileged -v /dev/bus/usb:/dev/bus/usb debian bash
|
||||
```
|
||||
|
||||
有关容器特权的更多详情请参考[这里](https://docs.docker.com/engine/reference/run/#/runtime-privilege-and-linux-capabilities)
|
||||
|
||||
### 信息
|
||||
|
||||
* [`docker ps`](https://docs.docker.com/engine/reference/commandline/ps) 查看运行中的所有容器。
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue