在Docker容器中添加GPG密钥导致“没有找到有效的OpenPGP数据” [英] Adding GPG key inside docker container causes "no valid OpenPGP data found"

查看:2523
本文介绍了在Docker容器中添加GPG密钥导致“没有找到有效的OpenPGP数据”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Docker容器中安装New Relic的系统监控,但是 apt-key add - 失败,没有有效的OpenPGP数据发现

I'm trying to install New Relic's system monitoring inside a docker container, but the apt-key add - fails with no valid OpenPGP data found.

有完整的 Dockerfile

FROM ubuntu
MAINTAINER Matej Koubik

RUN echo deb http://apt.newrelic.com/debian/ newrelic non-free >> /etc/apt/sources.list.d/newrelic.list
RUN wget -O- https://download.newrelic.com/548C16BF.gpg | apt-key add -
RUN apt-get update
RUN apt-get install newrelic-sysmond
RUN nrsysmond-config --set license_key=...
RUN /etc/init.d/newrelic-sysmond start


推荐答案

通过@xdays解决问题,但也围绕ssl提供的保护。您可以安装 ca-certificates 包,然后发出你的wget语句,它应该使用ssl。

The solution provided by @xdays works around the problem, but also works around the protection that ssl is providing. You could install the ca-certificates package before issuing your wget statement and it should work with ssl.

在调用wget之前添加以下行:

Add the following line before your call to wget:

RUN apt-get install -y ca-certificates wget

这篇关于在Docker容器中添加GPG密钥导致“没有找到有效的OpenPGP数据”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆