X的发行文件无效,但在apt-get更新中出错

问题描述 投票:0回答:1

[尝试构建基于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.

并且构建失败。我该如何解决?

docker ubuntu docker-for-windows
1个回答
0
投票

事实证明,适用于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)。

© www.soinside.com 2019 - 2024. All rights reserved.