Raymond Ops
May 27, 2025 · Operations
How to Change a Docker Container’s Clock Without Affecting the Host
To test data with strict time constraints without altering the host, this guide shows how to modify a Docker container’s clock using libfaketime, explains why direct date changes fail due to Linux capabilities, and provides step‑by‑step Dockerfile, build, run, and verification instructions.
DockerDockerfileLinux capabilities
0 likes · 7 min read