ro mounts

This commit is contained in:
Vincent Batts 2017-11-05 11:31:16 -05:00
parent c0ec581549
commit 928057efe0
1 changed files with 2 additions and 2 deletions

View File

@ -37,13 +37,13 @@ Running ioctl's inside containers is a little tricky.
Assuming we've already `insmod` the module above:
```shell
sudo docker run -it --rm -v $(pwd)/helloctl/helloctl:/usr/bin/helloctl -v /dev/helloctl:/dev/helloctl fedora /usr/bin/helloctl
sudo docker run -it --rm -v $(pwd)/helloctl/helloctl:/usr/bin/helloctl:ro -v /dev/helloctl:/dev/helloctl:ro fedora /usr/bin/helloctl
```
You'll get a failure `Could not open /dev/helloctl`
```shell
sudo docker run -it --rm -v $(pwd)/helloctl/helloctl:/usr/bin/helloctl -v /dev/helloctl:/dev/helloctl --privileged fedora /usr/bin/helloctl
sudo docker run -it --rm -v $(pwd)/helloctl/helloctl:/usr/bin/helloctl:ro -v /dev/helloctl:/dev/helloctl:ro --privileged fedora /usr/bin/helloctl
```
Now `dmesg | tail` will reflect the command ran successfully.