Vin*_*rma 1 docker dockerfile ubuntu-20.04
我正在尝试从 ubuntu16 升级到 ubuntu20,为此我需要将映像更改arm32v7/ubuntu:16.04为arm32v7/ubuntu:20.04我们所有的 Dockerfile [之后更新所需的库],但是在执行此任务时,我发现 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.
Run Code Online (Sandbox Code Playgroud)
我试着解决这里提到[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
And*_*org 13
我最近在 Docker Desktop for Mac 上遇到了这个问题,它apt-get update在 Ubuntu 20.04 x86_64 容器中运行。事实证明,在 macOS 上托管 Docker 映像的 VM 已用完磁盘空间。这以某种方式表现为apt报告包索引文件上的无效签名。修剪未使用的图像以释放空间为我解决了这个问题:
docker image prune -a
正如提到的评论由SEMA,如果问题是由磁盘空间不足引起的,另一种解决方法是增加运行泊坞窗虚拟机使用的虚拟磁盘的大小。在 Docker Desktop for Mac 中,这可以通过 Preferences > Resources > Disk image size.
| 归档时间: |
|
| 查看次数: |
3042 次 |
| 最近记录: |