/proc/device-tree is empty in my container - cannot get it filled

Hey folks,

i use a small compose.yaml to start a docker container (raspimatic docker). the image owner declares it should run with privileged mode and well - sure, it works then. if i am not using the privileged mode i came across a problem: the container application cannot read the model out of the /proc/device-tree - the complete folder is empty.
I know, it is probably just not the right type of application to put into a container, anyways i asked myself how to fill this file/structure to fix that, so i entered in the compose-yaml a volume mapping to a) fill device-tree b) fill the folder structure (/sys/…) after the symbolic link of device tree c) map the exact file /proc/device-tree/model

but every variation fails, like i cannot put something there. I used the syntax like this:

volumes:
    - ./docker_volumes/tmp/model:/proc/device-tree/model

What am i doing wrong here? Are some sections prohibit for mapping volumes/files into like /proc and /sys?

Best Regards,

Oscar

To quote ChatGPT:

In Linux, /proc and /sys are special file systems that provide an interface to kernel data structures. They are not real files on disk in the same way that regular files are; instead, they are virtual file systems.

That’s why you need to use privileged to enable access to those inside a container. Be aware that privileged does not work in Docker Swarm (issue).