[尝试构建基于ubuntu的Docker容器(适用于Windows的Docker)时,突然间我收到类似于以下错误
E: Release file for http://archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease is not valid yet (invalid for another 9h 55min 59s). Updates for this repository will not be applied.
并且构建失败。我该如何解决?
事实证明,适用于Windows的Docker具有a problem with clock drift(可能由于笔记本电脑的睡眠)。
解决方案是在Docker中调整系统时钟,例如
>docker run --privileged -it ubuntu:20.04
root@0b05be0fc8b6:/# date +%T -s "12:21:43"
假设“ 12:21:43”是世界标准时间(UTC)。