What You”ll Need
- Docker Engine v29.5.0 or newer (dockerd with feature-flag support)
- Linux host kernel with or without time namespace support (kernel 5.6+ recommended)
- root or sudo access to edit /etc/docker/daemon.json or Docker Desktop settings
- systemctl or service control to restart the Docker daemon
How It Works
Time namespaces are a kernel facility that lets a process tree observe and modify wall-clock time independently of the host. Docker exposed integration so containers can opt into isolated time behavior. The new daemon feature flag lets you disable Docker”s usage of time namespaces globally: when disabled, Docker will not create or expose isolated time namespaces to containers.
At a high level, you toggle the feature at the daemon level (daemon.json on Linux or the Docker Engine JSON editor in Docker Desktop), restart dockerd so it reads the new configuration, and then run containers as usual. Disabling is useful for compatibility (older tooling that assumes host time), simpler debugging, or environments where kernel support is missing.
Step-by-Step Guide β [docker] time-namespaces flag
- Confirm your Docker version: run
docker versionordockerd --versionand ensure you are on v29.5.0 or later; upgrade if not. - Edit daemon config (Linux): open
/etc/docker/daemon.jsonand add or update the features map:{ "features": { "time-namespaces": false } }. Preserve other keys and valid JSON syntax. - Edit Docker Desktop (macOS/Windows): open Settings > Docker Engine (the JSON editor) and add
"features": { "time-namespaces": false }into the top-level object, then Apply & Restart. - Restart the daemon: run
sudo systemctl restart dockeror use the Docker Desktop restart action so the new feature flag takes effect. - Verify the change: inspect daemon logs (
journalctl -u docker -n 200) for messages about feature flags, or check your centrally managed config to confirmtime-namespacesis set tofalse. Optionally, run a test container that previously relied on a private time namespace to ensure it now observes host time. - Roll out: apply the same change across your fleet (configuration management, Docker Cloud config, or Desktop settings) and monitor for any runtime issues.
Use Cases & Examples
CI reproducible builds: If your build jobs depend on consistent timestamps and existing tooling assumes host time, disabling time namespaces ensures containers use host wall-clock time and avoids time-drift surprises during artifact signing or cache keys.
Monitoring & logging compatibility: Some monitoring agents and log collectors expect container timestamps to match host time. With the [docker] time-namespaces flag set to false, logs and metrics align with host time, simplifying correlation.
Legacy apps and debugging: When debugging time-related bugs in older applications that aren”t aware of isolated time, you can disable time namespaces to reproduce issues under the host time context without changing application code.
Common Issues
- Daemon fails to start: malformed JSON in
/etc/docker/daemon.json. Fix syntax (use a JSON linter) and restart. - Feature flag not recognized: you may be running an older Docker version. Confirm you are on v29.5.0+; upgrade the engine if needed.
- Kernel lacks time-namespace support: if your kernel predates time-namespace support, the flag has no effect; consider using a newer kernel (5.6+ recommended) or keep the flag disabled for compatibility.
- Containers expected isolated time: containers that relied on time namespaces will observe host time after disabling. Revert the flag or migrate the workload if isolation is required.
What”s Next
- Consider using more granular runtime flags for specific containers if you need mixed behavior in the same host.
- Review other daemon feature flags introduced in v29.x to tune behavior across your fleet.
- Test your monitoring and CI pipelines under both enabled and disabled states to determine the correct default for your environment.
Related Resources
π οΈ Try These Free Tools
Plan your upgrade path with breaking change warnings and step-by-step guidance.
Estimate migration hours and risk for CI/CD pipeline version upgrades.
Paste release notes from two versions to get categorised breaking changes and new features.