我正在尝试从Ubuntu16升级到Ubuntu20,为此我需要在所有Dockerfiles中将图像arm32v7/ubuntu:16.04
更改为arm32v7/ubuntu:20.04
[更新所需的库],但是在完成这项任务时,我发现Ubuntu:20.04的arm32v7基础镜像存在问题 - 当我运行apt-get update
时,会出现以下错误消息-
Err:1 http://ports.ubuntu.com/ubuntu-ports focal InRelease
At least one invalid signature was encountered.
Get:4 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease [107 kB]
Err:2 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease
At least one invalid signature was encountered.
Err:3 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease
At least one invalid signature was encountered.
Err:4 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease
At least one invalid signature was encountered.
Reading package lists... Done
W: GPG error: http://ports.ubuntu.com/ubuntu-ports focal InRelease: At least one invalid signature was encountered.
E: The repository 'http://ports.ubuntu.com/ubuntu-ports focal InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease: At least one invalid signature was encountered.
E: The repository 'http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
我尝试了这里提到的解决方案[https://askubuntu.com/a/1264921/872700],但由于我们在Dockerfile中使用镜像,所以不允许在docker build命令中传递--security-opt选项,因此该解决方案也无法正常工作。
作为解决方法,我使用--security-opt选项运行了docker run,并创建了另一个镜像,然后在新镜像中运行了apt-get update,但这也不起作用。
FYI,该机器上有以下docker版本- Docker version 19.03.13, build 4484c46