docker - 存储库未在 docker build 中登录
问题描述
我有以下使用从 dockerhub 提取的最新 Ubuntu 映像的 Dockerfile:
FROM ubuntu:latest
RUN apt-get update && apt-get install -y g++ llvm lcov
当我启动 docker build 命令时,会出现以下错误:
Err:2 http://archive.ubuntu.com/ubuntu bionic InRelease 遇到至少一个无效签名。
Err:1 http://security.ubuntu.com/ubuntu bionic-security InRelease 遇到至少一个无效签名。
Err:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease 遇到至少一个无效签名。
Err:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease 遇到至少一个无效签名。
正在阅读包裹清单...
W:GPG 错误: http: //archive.ubuntu.com/ubuntu bionic InRelease:遇到至少一个无效签名。E:存储库“ http://archive.ubuntu.com/ubuntu bionic InRelease”未签名。
W:GPG 错误:http ://security.ubuntu.com/ubuntu bionic-security InRelease:遇到至少一个无效签名。E:存储库“ http://security.ubuntu.com/ubuntu bionic-security InRelease”未签名。
W:GPG 错误: http: //archive.ubuntu.com/ubuntu bionic-updates InRelease:遇到至少一个无效签名。E:存储库“ http://archive.ubuntu.com/ubuntu bionic-updates InRelease”未签名。
W:GPG 错误: http: //archive.ubuntu.com/ubuntu bionic-backports InRelease:遇到至少一个无效签名。E:存储库“ http://archive.ubuntu.com/ubuntu bionic-backports InRelease”未签名。
我在这里读到https://superuser.com/questions/1331936/how-can-i-get-past-a-repository-is-not-signed-message-when-attempting-to-upgr你可以通过这个错误使用 --allow-unauthenitcated 或 --allow-insecure-repositories 但在我看来,这两种方法都可能会损害容器的安全性。
编辑
试图用不同的发行版名称拉 ubuntu:18.04, ubuntu:19:04, ubuntu:19.10 相同的错误
解决方案
显然我的根分区已满(可能我尝试过多次通过 apt 下载软件包),运行sudo apt clean
解决了问题
推荐阅读
- dependencies - Bazel 不会构建依赖目标的文件
- microsoft-teams - Microsoft Graph API 获取频道成员
- html - 如何在按钮内显示左双引号?
- python - 在 scipy 中使用 numpy 数字化输出最小化问题
- sqlite - 将其连接到 sqlite 后无法构建我的应用程序
- python - 为什么我的 Gmail 帐户 Bruteforcer 无法正常工作?
- python - Python 从并行文件夹中的 Jupyter Notebook 导入
- javascript - MySQL 未在 Node.js 中使用 Promise.All 运行
- javascript - 如何在更改第二个选择选项时使用不同的属性
- python - bash:/python/run/venv/bin/activate:没有这样的文件或目录