Troubleshooting Docker Invalid Date and Time
The message "Release file for xxx is not valid yet (invalid for another...). Updates for this repository will not be applied" may be produced during the creation of Docker images on Windows 10.
This problem is related to a date management issue that happens on a Windows 10 Docker environment: when the laptop/desktop running Docker is put in sleep mode, the internal clocks of the Docker processes are stopped. When the laptop/desktop is back on, the clocks restart but without getting synchronized with the actual current time.
To synchronize the Docker clock:
-
Run Windows Powershell ISE in administrator mode.
-
Execute the following script.
Disable-VMIntegrationService -VMName DockerDesktopVM -Name "Time Synchronization" Enable-VMIntegrationService -VMName DockerDesktopVM -Name "Time Synchronization"