/sys directory has been mounted by itserlf

Hello. I have run an official image of homeassistant on my pi board. But I’m confused that the direction “/sys/class/thermal/” on my host machine has been mounted into my container by default. I’ve checked my docker-compose.yml and I think it shouldn’t happen.

This is my docker-compose.yml:

version: “2”

image: Package home-assistant · GitHub
- /home/john/homeassistant/config:/config
container_name: “homeassistant”
network_mode: “host”
restart: unless-stopped

You can see I didn’t mount the “/sys” direction. Then why has that direction been mounted inside the container?

Thanks in advance.

The pseudo file-systems /sys and /proc provide a file based interface to the kernel. Without them being present in a container, the container would not work.

1 Like