简体   繁体   English

在 arm32v7/ubuntu:20.04 docker 中运行 apt update 时 GPG 无效签名错误

[英]GPG invalid signature error while running apt update inside arm32v7/ubuntu:20.04 docker

I am trying to upgrade from ubuntu16 to ubuntu20 and for that I need to change image arm32v7/ubuntu:16.04 to arm32v7/ubuntu:20.04 in all our Dockerfiles [update required libraries after that], But while working on this task I found that there's some issue with arm32v7 base image of ubuntu:20.04 - when I run apt-get update it fails with following error messages-我正在尝试从 ubuntu16 升级到 ubuntu20,为此我需要将所有arm32v7/ubuntu:16.04图像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.

I tried the solution mentioned here [https://askubuntu.com/a/1264921/872700] but that too is not working as we are using the image in Dockerfile and its not allowed to pass --security-opt in docker build command.我尝试了这里提到的解决方案 [https://askubuntu.com/a/1264921/872700] 但这也不起作用,因为我们在 Dockerfile 中使用图像,并且不允许在--security-opt docker build命令中传递--security-opt .

As a workaround I ran docker run with --security-opt option and created another image with docker commit - then ran apt-get update inside new image but that too is not working.作为一种解决方法,我使用--security-opt选项docker run --security-opt docker run并使用--security-opt docker commit创建另一个图像 - 然后在新图像中运行apt-get update但这也不起作用。

FYI, The machine has following docker version on it- Docker version 19.03.13, build 4484c46仅供参考,机器上有以下Docker version 19.03.13, build 4484c46版本 - Docker version 19.03.13, build 4484c46

I had this issue on Docker Desktop for Mac recently, running apt-get update in an Ubuntu 20.04 x86_64 container.我最近在 Docker Desktop for Mac 上遇到了这个问题,在 Ubuntu 20.04 x86_64 容器中运行apt-get update It turned out the VM hosting the Docker images on macOS had run out of disk space.事实证明,在 macOS 上托管 Docker 映像的 VM 已用完磁盘空间。 That somehow manifested itself as apt reporting invalid signatures on package index files.这以某种方式表现为apt报告包索引文件上的无效签名。 Pruning unused images to free space solved the issue for me:修剪未使用的图像以释放空间为我解决了这个问题:

docker image prune -a docker image prune -a

As mentioned in comment by sema , if the issue is caused by insufficient disk space, another workaround is to increase the size of the virtual disk used by the virtual machine that is running docker.正如sema 评论中提到的,如果问题是由磁盘空间不足引起的,另一种解决方法是增加运行 docker 的虚拟机使用的虚拟磁盘的大小。 In Docker Desktop for Mac this can be done via Preferences > Resources > Disk image size .在 Docker Desktop for Mac 中,这可以通过Preferences > Resources > Disk image size来完成。

To solve the problem, I had to update the library libseccomp2 on my host pi machine as I could not find any other solution to apply inside the base image.为了解决这个问题,我不得不在我的主机 pi 机器上更新库libseccomp2 ,因为我找不到任何其他解决方案来应用基本映像。

Downloaded the deb package from here and applied on host machine using -这里下载 deb 包并使用 - 在主机上应用 -

sudo dpkg -i libseccomp2_2.4.4-1+b1_armhf.deb

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Maven JIB 在 arm32v7/adoptopenjdk docker 容器内返回“CertPathValidatorException:签名检查失败” - Maven JIB returns "CertPathValidatorException: signature check failed" inside arm32v7/adoptopenjdk docker container 在 amd64 linux 机器上为 arm32v7 容器运行 docker build 时出错:standard_init_linux.go:207 - Error running docker build for arm32v7 container on amd64 linux machine: standard_init_linux.go:207 从 arm32v7 golang 映像构建 docker 映像时执行格式错误 - exec format error when building docker image from arm32v7 golang image arm32v7/python 安装 numpy - arm32v7/python install numpy 如何在高山Linux中获得docker体系结构,例如amd64,arm32v7? - How to get docker architecture, like amd64, arm32v7, in alpine linux? 在Raspberry Pi 3 B +上拉arm32v7 Docker容器映像 - Pulling arm32v7 Docker container images on Raspberry Pi 3 B + Docker 构建期间第二次 apt-get 更新后 Ubuntu 21.04 中的 GPG 错误 - GPG error in Ubuntu 21.04 after second apt-get update during Docker build 运行 docker 扫描<img>在 ubuntu 20.04 返回错误 - Running docker scan <image> returns an error on ubuntu 20.04 在 Raspberry Pi 4 上,“FROM”基础镜像 golang:latest 和 arm32v7/golang:latest 有什么不同? - On Raspberry Pi 4 are “FROM” base images golang:latest and arm32v7/golang:latest any different? Azure iot edge:解决方案没有在 VSCode 中构建和推送 arm32v7 平台 - Azure iot edge: Solution does not build and push for arm32v7 platform in VSCode
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM