Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!
Did you like my answer?
Based on the context provided, executing the rtcwake -d /dev/rtc1 -m off -s 60
command directly from within a Docker container is not feasible due to the inherent limitations of Docker containers. These limitations include restricted access to hardware resources and the absence of systemd, which are necessary for executing such commands.
The recommended approach is to use a host-level script that listens for a signal from the container and executes the rtcwake
command when triggered. This method effectively bypasses the container’s isolation but does not meet your requirement for direct execution within the container.
While you may consider adjusting Docker’s security settings or using privileged mode to potentially allow such operations, these approaches could introduce security risks and are not guaranteed to work. Therefore, the most reliable solution remains the use of a host-level script to manage the power-off operation.
Please, also check if these links can help you solve your problem: