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
it seems that the problem is wget, add
--no-check-certificate
to your wget, and everything is ok.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:
You can run
wget -O- https://download.newrelic.com/548C16BF.gpg | apt-key add -
seperately withwget -O- https://download.newrelic.com/548C16BF.gpg
andapt-key add -
. You can refer here.And this is same for
curl
.