Prevent Mac sleep during a Docker build
A large Docker build can run for many minutes, and a Mac that sleeps mid-build wastes all of it. Here is how to prevent Mac sleep during a Docker build and let safety limits decide when to stop.
Why builds get cut off
Docker builds run in the background, so an idle Mac or a closed lid can trigger sleep before the build finishes.
You return to a half-built image and start over, losing the cache benefit you were waiting on.
The LidRun workflow for Docker
LidRun detects Docker activity and holds the Mac awake while a build runs, so it can complete without interruption.
Battery and thermal thresholds gate the session. Builds run hot, so the continuous thermal read helps reduce risk on long compiles.
Tips for heavy builds
Plug in for big builds and keep the Mac on a hard, ventilated surface so heat has somewhere to go.
Set a cooling profile and a session timer so a runaway build does not keep the Mac awake longer than intended.
LidRun keeps your work running with the lid closed, with battery and thermal safety built in.
Frequently asked
Yes, while battery and thermal state stay within your thresholds. If a limit is reached, LidRun lets the Mac sleep.
LidRun watches thermal state continuously and cooling profiles respond as the workload heats up, which helps reduce risk on long builds.
Yes, with keep-running mode on, as long as conditions stay safe.