docker - 至少遇到一个无效签名

标签 docker kubernetes minikube skaffold

我正在尝试使用 minikube 构建微服务镜像并将其部署到在我的开发机器上运行的单节点 Kubernetes 集群。我正在使用 Google 的云原生微服务演示应用程序 Online Boutique 来了解 Kubernetes、Istio 等技术的使用。

链接到 github 存储库:microservices-demo

在遵循安装过程的同时,运行命令 skaffold run要构建和部署我的应用程序,我收到了一些错误:

Step 10/11 : RUN apt-get -qq update     && apt-get install -y --no-install-recommends         curl
 ---> Running in 43d61232617c
W: GPG error: http://deb.debian.org/debian buster InRelease: At least one invalid signature was encountered.
E: The repository 'http://deb.debian.org/debian buster InRelease' is not signed.
W: GPG error: http://deb.debian.org/debian buster-updates InRelease: At least one invalid signature was encountered.
E: The repository 'http://deb.debian.org/debian buster-updates InRelease' is not signed.
W: GPG error: http://security.debian.org/debian-security buster/updates InRelease: At least one invalid signature was encountered.
E: The repository 'http://security.debian.org/debian-security buster/updates InRelease' is not signed.
failed to build: couldn't build "loadgenerator": unable to stream build output: The command '/bin/sh -c apt-get -qq update     && apt-get install -y --no-install-recommends         curl' returned a non-zero code: 100

我在尝试构建 loadgenerator 时收到这些错误。
我该如何解决这个问题?

最佳答案

遇到这些错误的原因有几个:

  • 现有缓存和/或磁盘空间可能存在问题。为了修复它,您需要通过执行以下命令清除 APT 缓存:sudo apt-get cleansudo apt-get update .
  • 现有的 docker 镜像也是如此。执行:docker image prune -fdocker container prune -f以删除未使用的数据并释放磁盘空间。
  • 如果不关心安全风险,可以尝试运行apt-get命令与 --allow-unauthenticated--allow-insecure-repositories旗帜。根据docs :

  • Ignore if packages can't be authenticated and don't prompt about it. This can be useful while working with local repositories, but is a huge security risk if data authenticity isn't ensured in another way by the user itself.


    如果这有帮助,请告诉我。

    关于docker - 至少遇到一个无效签名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62473932/

    相关文章:

    windows-10 - 无法使用 Docker 作为驱动程序在 Windows 10 中启动 minikube

    php - 如何仅在退出另一个容器后才启动Docker容器

    linux - 有没有办法在Linux上通过命令行在docker上启用kubernetes?

    jenkins - 如何在Jenkins中获取Docker的容器ID

    kubernetes - 只允许使用证书访问 namespace

    apache-spark - 如何在 Kubernetes 容器/Pod 上挂载 S3 存储桶?

    Kubernetes 负载均衡

    ubuntu - 如何在 Ubuntu 虚拟机上的 Minikube 中使用代理?

    windows - 如何使用 Windows 的绝对路径创建卷?

    windows - 在没有虚拟化的情况下在 Windows 上运行 Docker