joachimBurket / joachimBurket.github.io

My github page repository
https://joachimBurket.github.io
MIT License
0 stars 0 forks source link

Question on 2021-08-07-podman-serial-device.md #1

Open Strunck opened 3 months ago

Strunck commented 3 months ago

Why using /mnt/engineering as example?

The following section made me wonder.

First, dont' forget to change the SELinux tag on the device (in the host) so that containers can use it: $ sudo chcon -t container_file_t /mnt/engineering

It is a bit confusing as a newbie. Why using /mnt/engineering, when in later example /dev/ttyUSB0 is used? Also a hint for the SELinux beginner on how to check for SELinux should help.

Maybe better to write: On SELinux enables systems the device (e.g. /dev/ttyUSB0) is most likely not to set up to work with a rootless podman container. For a container to access the device I choose to change the SELinux tag on the host OS:

# Check SELinux
$ sestatus

# change file security context
$ sudo chcon -t container_file_t /dev/ttyUSB0
joachimBurket commented 3 months ago

Hey there, First, thanks a lot for having taken the time to leave comment :) This part is indeed confusing and missing details, your suggestion fits better, I'll update the page.

Have you been able to access a serial device with Podman? Its been almost 3 years since I used it to access a device, and now Podman is at version 5 so I don't know if it still works with the latest version 😅