【发布时间】:2021-02-02 22:25:26
【问题描述】:
我正在尝试从 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 中使用图像并且不允许在 @987654327 中传递 --security-opt @ 命令。
作为一种解决方法,我使用--security-opt 选项运行docker run,并使用docker commit 创建另一个图像 - 然后在新图像中运行apt-get update,但这也不起作用。
仅供参考,机器上有以下 docker 版本-
Docker version 19.03.13, build 4484c46
【问题讨论】:
-
在 askubuntu askubuntu.com/questions/1263284/…987654321@上结帐重复
标签: docker dockerfile ubuntu-20.04