简体   繁体   English

无法成功构建 rocker/r-apt 映像 NO GPG KEY found

[英]Unable to successfully build the rocker/r-apt image NO GPG KEY found

I am attempting to utilize the rocker/r-apt image which enables R binary installs.我正在尝试使用启用 R 二进制安装的rocker/r-apt 映像。 My 72 Minute Docker Build using the r-base image could use some help...我的 72 分钟 Docker 使用 r-base 映像构建可能需要一些帮助...

My file looks like this.我的文件看起来像这样。

FROM container.registry/rocker/r-apt:bionic
RUN apt-get update

Couple of notes.几个笔记。 My company uses an internal registry, so i've downloaded the image from我的公司使用内部注册表,所以我从
https://hub.docker.com/r/rocker/r-apt https://hub.docker.com/r/rocker/r-apt
and pushed it to my local container registry.并将其推送到我的本地容器注册表。

When I try and build the Docker container it gives me this error.当我尝试构建 Docker 容器时,它给了我这个错误。 UPDATE - Full Error message更新 - 完整的错误消息

/deb.debian.org/debian testing InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 04EE7237B7D453EC NO_PUBKEY 648ACFD622F3D138

I can post a more detailed error message when the internet on my other computer returns.当我的另一台计算机上的互联网恢复时,我可以发布更详细的错误消息。

I realize now that bionic is the Ubuntu distro.我现在意识到仿生是 Ubuntu 发行版。 r-base uses a debian base from what I can tell.据我所知,r-base 使用 debian 基础。

My big question..what am I doing wrong to get this rocker/r-apt image to run correctly and still allow me to use apt-get to install a number of things, include the cran-r packages that its supposed to enable.我的大问题..我做错了什么让这个rocker / r-apt图像正确运行并且仍然允许我使用apt-get来安装一些东西,包括它应该启用的cran-r包。

I am following this post by datawookie.我正在关注 datawookie 的这篇文章。
https://datawookie.netlify.app/blog/2019/01/docker-images-for-rr-base-versus-r-apt/ https://datawookie.netlify.app/blog/2019/01/docker-images-for-rr-base-versus-r-apt/

UPDATE My new big question... should i be pointing at deb.debian.org/debian for apt-get?更新我的新大问题......我应该指向deb.debian.org/debian进行 apt-get 吗?

I would suggest to use rocker/r-ubuntu instead of rocker/r-apt (which predates it).我建议使用rocker/r-ubuntu而不是rocker/r-apt (它早于它)。 I am the man behind the curtain for both.我是幕后的人。

Within Rocker we have containers based on Debian, and containers based on Ubuntu, and containers based on Debian now that will likely be based on Ubuntu in the future. Within Rocker we have containers based on Debian, and containers based on Ubuntu, and containers based on Debian now that will likely be based on Ubuntu in the future. In short, "it's complicated" but that is in part... because we have so darn many containers already.简而言之,“这很复杂”,但部分原因是......因为我们已经拥有如此多的容器。

The source for background information is still our R Journal paper (shortcut to pdf ).背景信息的来源仍然是我们的 R 期刊论文pdf的快捷方式)。

Success... So the R-Ubuntu 20.04 appears to be working like a charm.成功...所以 R-Ubuntu 20.04 看起来就像一个魅力。 My outcome of decreasing the build time of my R application has worked.我减少 R 应用程序的构建时间的结果已经奏效。

72 Minutes is now 4 Minutes 72 分钟现在是 4 分钟

This is important because our applications run in CI/CD pipelines and so a 72 minute build is extremely annoying.这很重要,因为我们的应用程序在 CI/CD 管道中运行,因此 72 分钟的构建非常烦人。 Not to mention consumes lots of resources to compile code.更不用说编译代码会消耗大量资源。

It looks like all my issues were related to my organizations Nexus Repository.看起来我所有的问题都与我的组织 Nexus Repository 有关。 Once we downloaded the R-Ubuntu, we had to rebuild it from the GIT Repo to utilize our internal Ubuntu Image.一旦我们下载了 R-Ubuntu,我们必须从 GIT Repo 重建它,以利用我们内部的 Ubuntu 映像。 That fixed 1 problem.解决了 1 个问题。

Then I had to import the Michael Rutter Repo as a source and update that to utilize the internal repository.然后我必须导入 Michael Rutter Repo 作为源并更新它以利用内部存储库。

The one issue that might not be apparent is that the DockerFile has to have the apt-get update and installs in the correct order.一个可能不明显的问题是 DockerFile 必须进行 apt-get 更新并以正确的顺序安装。 I do not recall if the source image had all this, but I'll post the order here.我不记得源图像是否包含所有这些,但我会在这里发布订单。

RUN apt-get update \
    && apt-get install -y --no-install-recommends \
    && apt-get install -y gnupg2 \
    && apt-get install -y --no-install-recommends \
        dialog \
        software-properties-common \
        ed \
        less \
        locales \
        vim-tiny \
        wget \
        ca-certificates 

So once all that was setup it worked like magic.因此,一旦所有这些都设置好了,它就会像魔术一样工作。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM