-
Notifications
You must be signed in to change notification settings - Fork 282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker reports incorrect time to containers under virtualized Windows #12499
Comments
Same issue with WSL2 |
Can confirm. WSL2 container running on the machine reports the same incorrect time. |
Perhaps related to microsoft/WSL#4114 |
Issues go stale after 90 days of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
This is not stale. I can reproduce it with the latest Docker Desktop (4.7.1 (77678)) on Windows 10. |
I am also having the same problem with 4.7.1. We use VMs with snapshots and Docker constantly gets out of sync with the time, causing the "Release file for http://security.debian.org/debian-security/dists/bullseye-security/InRelease is not valid yet invalid for another 45min 21s" error |
Closed issues are locked after 30 days of inactivity. If you have found a problem that seems similar to this, please open a new issue. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
Actual behavior
The time reported to docker containers refers to a time in the past.
This leads to observable problems if you run
date
Starting a new docker container returns the timestamps:
At that time, the timestamp should have been (off by about a day)
This applies to programs that check for the date as well, such as
apt-get
.This leads to error messages such as:
With
apt-get
failing due to the time issue.(The host windows system is reporting the correct time.)
Expected behavior
The time reported inside of the docker container should match the time of the host windows system.
Information
This problem is this issue leads to incorrect timestamps and failing server connections due to time being off.
This is reliably reproducible. I am not sure when this issue first appeared.
The issue seems to be the time becomes incorrect if the Windows virtual machine is paused. When Windows is resumed, the the time reported inside the docker container does not update. The Windows machine does correctly jump to the current time.
Neither restarting Docker Desktop nor using the "Pause" in Docker Desktop corrects the time.
Enabling the "Time Sync" setting on in VMware also does not solve the issue.
The only way to correct the time in the docker container is to restart the Windows virtual machine.
Output of
& "C:\Program Files\Docker\Docker\resources\com.docker.diagnose.exe" check
Steps to reproduce the behavior
docker run --rm ubuntu date
docker run --rm ubuntu date
The text was updated successfully, but these errors were encountered: