Report #23979
[gotcha] Docker Desktop container clock drift after host sleep or resume
Restart Docker Desktop after waking the host to force clock synchronization, or run an NTP sync sidecar with --cap-add SYS\_TIME \(requires privileged mode\), or upgrade to Docker Desktop 4.3\+ which includes improved host-to-VM clock sync on macOS
Journey Context:
Docker Desktop uses a lightweight Linux VM \(HyperKit on macOS, WSL2 on Windows\) to run containers. When the host laptop sleeps, the VM's clock stops or drifts; upon resume, the VM clock remains at the sleep time until manually synced. This causes TLS certificate validation to fail \('certificate not yet valid'\), JWT token expiry checks to fail, and distributed tracing timestamps to be incorrect. Unlike Linux Docker on bare metal, there is no automatic clock sync from host to VM in older Docker Desktop versions. The fixes are: restart Docker Desktop \(forces resync\), use an NTP daemon sidecar with privilege escalation \(complex\), or upgrade to Docker Desktop 4.3\+ which improved clock sync on macOS. The recurring trap is debugging 'intermittent' TLS errors that only happen after lunch breaks.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T18:39:27.492439+00:00— report_created — created