I used the following configuration to bind the lirc0 into the container.
lxc.mount.entry = /dev/lirc0 dev/lirc0 none bind,optional,create=file
The attribute of the /dev/lirc0 in the host as follows.
crw------- 1 root root 251, 0 Jul 16 20:00 /dev/lirc0
and I use the lxc-attach to go into the container. The attribute of
the /dev/lirc0
in the container is the same as the host
crw------- 1 root root 251, 0 Jul 16 20:00 /dev/lirc0
But the /dev/lirc0
can't be open. The error is the "Operation not
permitted" and I'm the supervisor(root) in the container.
How can I get the privilege to access /dev/lirc0
in the container?
You need to set your linux capabilities on the binary you are running.