Docker Community Forums

Share and learn in the Docker community.

Auto-pause/resume container when on/off battery power?


(Gary Bartlett) #1

Docker containers can be manually paused and resumed. Is there a way with Docker-for-Mac to specify that a container should automatically pause when switching to battery power (to save energy) and resume again when external power is restored? I know the Mac broadcasts some type of power event for this that might be able to be hooked. If not via a Docker mechanism/config, then can anyone suggest an external way to trigger running the docker pause command?


(David Sheets) #2

Thanks for the suggestion, Gary! I’ve opened a tracking ticket for this feature which we agree would be very nice to have. We’ll look at putting it on the roadmap soon.

Thanks for using Docker for Mac!

Best regards,

David


(Gary Bartlett) #3

Thanks @dsheets. :+1:

In the meantime, if anyone else is interested in this functionality, I have found that ControlPlane works well as an external solution.