Rebooting Raspberry Pi from within HA

Hello,
Not sure if this is possible or not but I’m wondering if there’s any way I can make my raspberry pi reboot itself from within HA.
I’m running HA in docker mode.

Thanks for any input on this.

It should be possible by setting up ssh access to localhost (in order to escape from the container) and running the reboot command.