ro mounts

This commit is contained in:
Vincent Batts 2017-11-05 11:31:16 -05:00
parent c0ec581549
commit 928057efe0

View file

@ -37,13 +37,13 @@ Running ioctl's inside containers is a little tricky.
Assuming we've already `insmod` the module above: Assuming we've already `insmod` the module above:
```shell ```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` You'll get a failure `Could not open /dev/helloctl`
```shell ```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. Now `dmesg | tail` will reflect the command ran successfully.