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
.
There is the full 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
One of the other reasons for the “gpg: no valid OpenPGP data found” error can be the configuration problem of your machine, where the “curl” command is searching for the root CA in the wrong place. To handle the “gpg: no valid OpenPGP data found” error, in this case, you have to fix the CURL certificates path in the “.
gpg is the tool used in secure apt to sign files and check their signatures. That works if the key server is up (see issue 13555, and "Key server times out while installing docker on Ubuntu 14.04") The pool hkp://p80.pool.sks-keyservers.net is a subset of servers which are also available on port 80.11-Oct-2016.
GPG, or GNU Privacy Guard, is a public key cryptography implementation. This allows for the secure transmission of information between parties and can be used to verify that the origin of a message is genuine.
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.
Add the following line before your call to wget:
RUN apt-get install -y ca-certificates wget
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With