我正在尝试从ubuntu16升级到ubuntu20,为此,我需要将所有Dockerfile中的映像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中使用映像并且不允许在映像中传递--security-opt
,所以该方法也无法正常工作docker build
命令。
作为一种解决方法,我运行带有docker run
选项的--security-opt
并创建了带有docker commit
的另一个图像-然后在新图像中运行了apt-get update
,但这同样行不通。 >
仅供参考,该计算机上具有以下docker版本-
Docker version 19.03.13, build 4484c46
答案 0 :(得分:2)
我最近在Mac的Docker桌面上遇到了这个问题,该问题在Ubuntu 20.04 x86_64容器中运行apt-get update
。事实证明,在macOS上托管Docker映像的VM磁盘空间不足。这以某种方式表现为apt
,它报告程序包索引文件上的无效签名。修剪未使用的图像以释放空间对我来说解决了这个问题:
docker image prune -a
答案 1 :(得分:1)
要解决该问题,我不得不在主机pi机器上更新库libseccomp
,因为找不到在基本映像中应用的任何其他解决方案。
从here下载了deb软件包,并使用-
将其应用到了主机上 sudo dpkg -i libseccomp2_2.4.4-1+b1_armhf.deb