I recently came across an issue that my Ubuntu Docker containers were failing restoring packages and this was due to them having a different time than my Windows 10 laptop.
After Googling the solution suggested was to reboot my laptop but as I'd just turned it on and got everything setup this wasn't something that I wanted to do.
The commands that most people suggested was to run a command in the container to re-synchronise the time with the host but the command returned an error when I tried this.
Thankfully to re-synchronise the time it was quite simple, just run this command from a PowerShell window:
Docker Desktop will quickly inform you that it isn't working and suggest you start it.
Once it is started again everything was back in sync and I could restore packages again!