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
asked Jan 3, 2014 at 17:14
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
answered Feb 20, 2014 at 22:43
johncostajohncosta
3,7321 gold badge25 silver badges25 bronze badges
I ran into this issue when i was installing docker.
run
sudo apt install apt-transport-https ca-certificates curl software-properties-common
You can refer here.
And then
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
answered Dec 11, 2019 at 9:13
KevalKeval
4099 silver badges15 bronze badges
0
it seems that the problem is wget, add --no-check-certificate
to your wget, and everything is ok.
# wget --no-check-certificate -O- https://download.newrelic.com/548C16BF.gpg | apt-key add - --2014-01-12 09:29:30-- https://download.newrelic.com/548C16BF.gpg Resolving download.newrelic.com (download.newrelic.com)... 50.31.164.159 Connecting to download.newrelic.com (download.newrelic.com)|50.31.164.159|:443... connected. WARNING: cannot verify download.newrelic.com's certificate, issued by `/C=US/O=GeoTrust, Inc./CN=GeoTrust SSL CA': Unable to locally verify the issuer's authority. HTTP request sent, awaiting response... 200 OK Length: 1682 (1.6K) [application/octet-stream] Saving to: `STDOUT' 100%[=================================================================================================================================================>] 1,682 --.-K/s in 0s 2014-01-12 09:29:31 (15.1 MB/s) - written to stdout [1682/1682] OK
answered Jan 12, 2014 at 9:31
xdaysxdays
7195 silver badges19 bronze badges
2
You can run wget -O- https://download.newrelic.com/548C16BF.gpg | apt-key add -
seperately with wget -O- https://download.newrelic.com/548C16BF.gpg
and apt-key add -
. You can refer here.
And this is same for curl
.
answered Oct 28, 2017 at 9:23
LF00LF00
26.2k27 gold badges148 silver badges281 bronze badges
Comments
This was referenced
May 1, 2022
This was referenced
May 17, 2022
hrushig
added a commit
to hrushig/amazon-sagemaker-tensorflow-object-detection-api
that referenced
this issue
May 24, 2022
This was referenced
May 27, 2022
limdongjin
added a commit
to limdongjin/pororo-bugfix-dockerfile
that referenced
this issue
Jun 2, 2022
bfineran
added a commit
to neuralmagic/sparseml
that referenced
this issue
Jul 14, 2022
the original error has been fixed (NVIDIA/nvidia-docker#1632) and pulling the latest nvidia cuda ubuntu image and running the fix will produce an error **test_plan** build passes locally (second rm command gets a no such file error previously)
bfineran
added a commit
to neuralmagic/sparseml
that referenced
this issue
Jul 22, 2022
* remove sparseml Dockerfile cuda temporary error fix the original error has been fixed (NVIDIA/nvidia-docker#1632) and pulling the latest nvidia cuda ubuntu image and running the fix will produce an error **test_plan** build passes locally (second rm command gets a no such file error previously) * make fix conditional * command fix
desaixie
added a commit
to desaixie/DeepLIIF
that referenced
this issue
Jul 29, 2022
First error is from Ubuntu cuda GPG error "public key is not available": NVIDIA/nvidia-docker#1632 (comment). Second error is from setup.py requiring README.md but Dockerfile does not copy README.md into the docker image.
This was referenced
Aug 9, 2022
felihong
added a commit
to felihong/dstoolkit-objectdetection-tensorflow-azureml
that referenced
this issue
Nov 24, 2022
oz123
added a commit
to spectrocloud-labs/gpu-operator
that referenced
this issue
Dec 9, 2022
Help me to install Docker:
spyam@linux:~$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
curl: (22) The requested URL returned error: 403
gpg: no valid OpenPGP data found.
This is on Ubuntu 20.04 LTS.
Eliah Kagan
115k53 gold badges311 silver badges484 bronze badges
asked Jun 8, 2020 at 18:27
Try:
wget https://download.docker.com/linux/ubuntu/gpg
apt-key add gpg
I just downloaded the key with no issue.
answered Jun 8, 2020 at 18:49
Artur MeinildArtur Meinild
15.2k15 gold badges40 silver badges75 bronze badges
6
I followed these instructions for installing docker
on debian 9.11 «stretch»
https://docs.docker.com/engine/install/debian/
My file /etc/apt/sources.list
looks like this
deb http://repo.myloc.de/debian stretch main non-free contrib
deb-src http://repo.myloc.de/debian stretch main non-free contrib
deb http://repo.myloc.de/debian-security stretch/updates main
deb-src http://repo.myloc.de/debian-security stretch/updates main
deb http://repo.myloc.de/debian stretch-updates main
deb-src http://repo.myloc.de/debian stretch-updates main
deb https://download.docker.com/linux/debian stretch stable
#deb-src [arch=amd64] https://download.docker.com/linux/debian stretch stable
The command
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
gives
OK
but apt update
results in
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://get.docker.com/ubuntu docker Release: The following signatures were invalid: 36A1D7869245C8950F966E92D8576A8BA88D21E9
W: Failed to fetch https://get.docker.com/ubuntu/dists/docker/Release.gpg The following signatures were invalid: 36A1D7869245C8950F966E92D8576A8BA88D21E9
W: Some index files failed to download. They have been ignored, or old ones used instead.
I am confused by the mentioning of ubuntu
there, but probably that’s fine.
EDIT: additional information requested in a comment
> uname -a
Linux b028 4.9.0-12-amd64 #1 SMP Debian 4.9.210-1 (2020-01-20) x86_64 GNU/Linux
> grep ^deb /etc/apt/sources.list.d/*
/etc/apt/sources.list.d/docker.list:deb https://get.docker.com/ubuntu docker main
/etc/apt/sources.list.d/docker.list.save:deb https://get.docker.com/ubuntu docker main
/etc/apt/sources.list.d/nodesource.list:deb https://deb.nodesource.com/node_0.12 wheezy main
/etc/apt/sources.list.d/nodesource.list:deb-src https://deb.nodesource.com/node_0.12 wheezy main
/etc/apt/sources.list.d/nodesource.list.save:deb https://deb.nodesource.com/node_0.12 wheezy main
/etc/apt/sources.list.d/nodesource.list.save:deb-src https://deb.nodesource.com/node_0.12 wheezy main
The content of the sources.list.d
directory could be remnants that are wrong. Probably, I have to delete them.
I have been trying to get a project to work for my job. I recently got a M1 Air, however I had a similar issues when I was doing the same thing on a Windows machine with WSL. The error is as follows:
#8 8.455 ## To install the Yarn package manager, run:
#8 8.455 curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null
#8 8.455 echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
#8 8.455 sudo apt-get update && sudo apt-get install yarn
#8 8.455
#8 8.455
#8 8.455 + apt-get install -y nodejs
#8 8.462 Reading package lists...
#8 8.805 Building dependency tree...
#8 8.871 Reading state information...
#8 8.942 The following NEW packages will be installed:
#8 8.942 nodejs
#8 9.093 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
#8 9.093 Need to get 24.5 MB of archives.
#8 9.093 After this operation, 121 MB of additional disk space will be used.
#8 9.093 Get:1 https://deb.nodesource.com/node_14.x buster/main arm64 nodejs arm64 14.18.2-deb-1nodesource1 [24.5 MB]
#8 12.29 debconf: delaying package configuration, since apt-utils is not installed
#8 12.30 Fetched 24.5 MB in 3s (7,533 kB/s)
#8 12.32 Selecting previously unselected package nodejs.
(Reading database ... 23271 files and directories currently installed.)
#8 12.33 Preparing to unpack .../nodejs_14.18.2-deb-1nodesource1_arm64.deb ...
#8 12.33 Unpacking nodejs (14.18.2-deb-1nodesource1) ...
#8 13.92 Setting up nodejs (14.18.2-deb-1nodesource1) ...
#8 13.94 + curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg
#8 13.94 + apt-key add -
#8 13.97 Warning: apt-key output should not be parsed (stdout is not a terminal)
#8 14.39 gpg: no valid OpenPGP data found.
------
executor failed running [/bin/bash -oeux pipefail -c curl -sL https://deb.nodesource.com/setup_14.x | bash - && apt-get install -y nodejs && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && apt-get update && apt-get install yarn]: exit code: 2
ERROR: Service 'app' failed to build : Build failed
Has anyone experienced a similar thing?
Here is my dockerfile.
FROM php:7.4-fpm-buster
SHELL ["/bin/bash", "-oeux", "pipefail", "-c"]
# timezone environment
ENV TZ=UTC
# locale
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_ALL=en_US.UTF-8
# composer environment
COMPOSER_ALLOW_SUPERUSER=1
COMPOSER_HOME=/composer
# Laravel environment
APP_SERVICES_CACHE=/tmp/cache/services.php
APP_PACKAGES_CACHE=/tmp/cache/packages.php
APP_CONFIG_CACHE=/tmp/cache/config.php
APP_ROUTES_CACHE=/tmp/cache/routes.php
APP_EVENTS_CACHE=/tmp/cache/events.php
VIEW_COMPILED_PATH=/tmp/cache/views
COPY --from=composer:1.10 /usr/bin/composer /usr/bin/composer
RUN apt-get update &&
apt-get -y install git libicu-dev libonig-dev libzip-dev unzip locales libpq-dev libpng-dev libjpeg-dev libfreetype6-dev imagemagick libmagickwand-dev &&
pecl install imagick &&
docker-php-ext-enable imagick &&
docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ &&
docker-php-ext-install -j$(nproc) gd pdo pdo_pgsql &&
apt-get clean &&
rm -rf /var/lib/apt/lists/* &&
locale-gen en_US.UTF-8 &&
localedef -f UTF-8 -i en_US en_US.UTF-8 &&
mkdir /var/run/php-fpm &&
mkdir -p /tmp/cache/views &&
chmod 777 -R /tmp/cache &&
docker-php-ext-install intl pdo_mysql zip bcmath &&
composer config -g process-timeout 3600 &&
composer config -g repos.packagist composer https://packagist.org &&
composer global require hirak/prestissimo
# node and yarn
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - &&
apt-get install -y nodejs &&
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - &&
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list &&
apt-get update && apt-get install yarn
RUN yarn global add secure-spreadsheet
COPY ./php-fpm.d/backend-www.conf /usr/local/etc/php-fpm.d/zzz-www.conf
COPY ./php.ini /usr/local/etc/php/php.ini
WORKDIR /work/backend
I tried a solution that I found by googling but ended up getting a different error that says:
failed to solve with frontend dockerfile.v0: failed to create LLB definition: dockerfile parse error line 41: unknown instruction: APT-GET ERROR: Service 'app' failed to build : Build failed
I also posted for help on reddit a bit ago hoping to get a faster answer to my problem. Any help would be much appreciated!
I am getting
Get:1 http://ports.ubuntu.com/ubuntu-ports focal InRelease [265 kB]
Get:2 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease [114 kB]
Get:3 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease [101 kB]
Err:1 http://ports.ubuntu.com/ubuntu-ports focal InRelease
At least one invalid signature was encountered.
Get:4 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease [114 kB]
Err:2 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease
At least one invalid signature was encountered.
Err:3 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease
At least one invalid signature was encountered.
Err:4 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease
At least one invalid signature was encountered.
Reading package lists...
W: GPG error: http://ports.ubuntu.com/ubuntu-ports focal InRelease: At least one invalid signature was encountered.
E: The repository 'http://ports.ubuntu.com/ubuntu-ports focal InRelease' is not signed.
W: GPG error: http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease: At least one invalid signature was encountered.
E: The repository 'http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease' is not signed.
W: GPG error: http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease: At least one invalid signature was encountered.
E: The repository 'http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease' is not signed.
W: GPG error: http://ports.ubuntu.com/ubuntu-ports focal-security InRelease: At least one invalid signature was encountered.
E: The repository 'http://ports.ubuntu.com/ubuntu-ports focal-security InRelease' is not signed.
when building from tuya-convert/Dockerfile at master · ct-Open-Source/tuya-convert (github.com)
(i have tried using ubuntu:latest and debian:latest in the FROM)
I am using Docker version 20.10.10, build b485636 it was installed from the official get-docker.sh
my pi4 raspbian is fully apt update and upgraded
i have tried multiple of the suggested solutions on stack exchange and other places.
Any ideas?
I fixed it using this on the pi host, no need to restart docker or pi
wget http://ftp.us.debian.org/debian/pool/main/libs/libseccomp/libseccomp2_2.5.1-1~bpo10+1_armhf.deb
sudo dpkg -i libseccomp2_2.5.1-1~bpo10+1_armhf.deb
I’m trying to follow the installation instructions for Debian provided on Docker website. Unfortunately adding a GPG key fails for me:
$ curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
gpg: WARNING: nothing exported
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
I’ve tried to download the key and add it from the local file system, but the effect is the same:
$ apt-key add docker.gpg
gpg: WARNING: nothing exported
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
The same happens for other keys, e.g. VirtualBox:
$ apt-key add oracle_vbox_2016.asc
gpg: WARNING: nothing exported
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
The keys looks fine:
$ cat docker.gpg
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFit2ioBEADhWpZ8/wvZ6hUTiXOwQHXMAlaFHcPH9hAtr4F1y2+OYdbtMuth
lqqwp028AqyY+PRfVMtSYMbjuQuu5byyKR01BbqYhuS3jtqQmljZ/bJvXqnmiVXh
[...]
jCxcpDzNmXpWQHEtHU7649OXHP7UeNST1mCUCH5qdank0V1iejF6/CfTFU4MfcrG
YT90qFF93M3v01BbxP+EIY2/9tiIPbrd
=0YYhg
-----END PGP PUBLIC KEY BLOCK-----
$ shasum docker.gpg
f5b5bd1487cefc0c53c947e11ca202e86b33dbad docker.gpg
$ gpg --list-packets docker.gpg
# off=0 ctb=99 tag=6 hlen=3 plen=525
:public key packet:
version 4, algo 1, created 1487788586, expires 0
pkey[0]: [4096 bits]
pkey[1]: [17 bits]
keyid: 8D81803C0EBFCD88
# off=528 ctb=b4 tag=13 hlen=2 plen=43
:user ID packet: "Docker Release (CE deb) <docker@docker.com>"
# off=573 ctb=89 tag=2 hlen=3 plen=567
:signature packet: algo 1, keyid 8D81803C0EBFCD88
version 4, created 1487792064, md5len 0, sigclass 0x13
digest algo 10, begin of digest b2 c9
hashed subpkt 2 len 4 (sig created 2017-02-22)
hashed subpkt 27 len 1 (key flags: 2F)
hashed subpkt 11 len 4 (pref-sym-algos: 9 8 7 3)
hashed subpkt 21 len 4 (pref-hash-algos: 10 9 8 11)
hashed subpkt 22 len 4 (pref-zip-algos: 2 3 1 0)
hashed subpkt 30 len 1 (features: 01)
hashed subpkt 23 len 1 (keyserver preferences: 80)
subpkt 16 len 8 (issuer key ID 8D81803C0EBFCD88)
data: [4094 bits]
# off=1143 ctb=b9 tag=14 hlen=3 plen=525
:public sub key packet:
version 4, algo 1, created 1487788586, expires 0
pkey[0]: [4096 bits]
pkey[1]: [17 bits]
keyid: 7EA0A9C3F273FCD8
# off=1671 ctb=89 tag=2 hlen=3 plen=1086
:signature packet: algo 1, keyid 8D81803C0EBFCD88
version 4, created 1487788586, md5len 0, sigclass 0x18
digest algo 8, begin of digest f2 b8
hashed subpkt 2 len 4 (sig created 2017-02-22)
hashed subpkt 27 len 1 (key flags: 02)
subpkt 16 len 8 (issuer key ID 8D81803C0EBFCD88)
subpkt 32 len 540 (signature: v4, class 0x19, algo 1, digest algo 8)
data: [4095 bits]
Am I doing something wrong? What steps should I take to troubleshoot it further?
I’m on Debian Stretch. I don’t have any firewall. I’ve tried it on several networks.