Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker build fails #590

Closed
StMarian opened this issue Jul 31, 2020 · 1 comment · Fixed by #616
Closed

Docker build fails #590

StMarian opened this issue Jul 31, 2020 · 1 comment · Fixed by #616

Comments

@StMarian
Copy link
Contributor

Scenario:

Download repo and run docker build:

git clone https://github.com/mongo-express/mongo-express.git
cd mongo-express
docker build -t mongo-express .

Expected:

The image build successfully

Found:

Error during build:

gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 6380DC428747F6C393FEACA59A84159D7001A4E5
/bin/sh: 1: gpg: not found
Full log
Sending build context to Docker daemon  983.6kB
Step 1/11 : FROM node:12-slim
12-slim: Pulling from library/node
cbd31ae33279: Pull complete 
4e8f99b4e7b4: Pull complete 
a2a2aef48322: Pull complete 
7a5492bd3709: Pull complete 
bf3d58f86ae1: Pull complete 
Digest: sha256:df96cca7ddada33ef3af3541cbda86937307286b3942fc725216bccc53998d6f
Status: Downloaded newer image for node:12-slim
 ---> 9708c2ed1a4b
Step 2/11 : ENV TINI_VERSION 0.9.0
 ---> Running in 9cd719ea6678
Removing intermediate container 9cd719ea6678
 ---> 7af5f9584af1
Step 3/11 : RUN set -x 	&& apt-get update && apt-get install -y ca-certificates curl 		--no-install-recommends 	&& curl -fSL "https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini" -o /usr/local/bin/tini 	&& curl -fSL "https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini.asc" -o /usr/local/bin/tini.asc 	&& export GNUPGHOME="$(mktemp -d)" 	&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 6380DC428747F6C393FEACA59A84159D7001A4E5 	&& gpg --batch --verify /usr/local/bin/tini.asc /usr/local/bin/tini 	&& rm -r "$GNUPGHOME" /usr/local/bin/tini.asc 	&& chmod +x /usr/local/bin/tini 	&& tini -h 	&& apt-get purge --auto-remove -y ca-certificates curl 	&& rm -rf /var/lib/apt/lists/*
 ---> Running in ba228c95f27e
+ apt-get update
Get:1 http://security.debian.org/debian-security stretch/updates InRelease [53.0 kB]
Ign:2 http://deb.debian.org/debian stretch InRelease
Get:3 http://deb.debian.org/debian stretch-updates InRelease [93.6 kB]
Get:4 http://deb.debian.org/debian stretch Release [118 kB]
Get:5 http://deb.debian.org/debian stretch Release.gpg [2410 B]
Get:6 http://security.debian.org/debian-security stretch/updates/main amd64 Packages [538 kB]
Get:7 http://deb.debian.org/debian stretch-updates/main amd64 Packages [2596 B]
Get:8 http://deb.debian.org/debian stretch/main amd64 Packages [7080 kB]
Fetched 7888 kB in 3s (2383 kB/s)
Reading package lists...
+ apt-get install -y ca-certificates curl --no-install-recommends
Reading package lists...
Building dependency tree...
Reading state information...
The following package was automatically installed and is no longer required:
  xz-utils
Use 'apt autoremove' to remove it.
The following additional packages will be installed:
  libcurl3 libffi6 libgmp10 libgnutls30 libgssapi-krb5-2 libhogweed4 libidn11
  libidn2-0 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 libldap-2.4-2
  libldap-common libnettle6 libnghttp2-14 libp11-kit0 libpsl5 librtmp1
  libsasl2-2 libsasl2-modules-db libssh2-1 libssl1.0.2 libssl1.1 libtasn1-6
  libunistring0 openssl
Suggested packages:
  gnutls-bin krb5-doc krb5-user
Recommended packages:
  krb5-locales publicsuffix libsasl2-modules
The following NEW packages will be installed:
  ca-certificates curl libcurl3 libffi6 libgmp10 libgnutls30 libgssapi-krb5-2
  libhogweed4 libidn11 libidn2-0 libk5crypto3 libkeyutils1 libkrb5-3
  libkrb5support0 libldap-2.4-2 libldap-common libnettle6 libnghttp2-14
  libp11-kit0 libpsl5 librtmp1 libsasl2-2 libsasl2-modules-db libssh2-1
  libssl1.0.2 libssl1.1 libtasn1-6 libunistring0 openssl
0 upgraded, 29 newly installed, 0 to remove and 4 not upgraded.
Need to get 7664 kB of archives.
After this operation, 19.6 MB of additional disk space will be used.
Get:1 http://security.debian.org/debian-security stretch/updates/main amd64 libcurl3 amd64 7.52.1-5+deb9u11 [292 kB]
Get:2 http://deb.debian.org/debian stretch/main amd64 libssl1.0.2 amd64 1.0.2u-1~deb9u1 [1304 kB]
Get:3 http://security.debian.org/debian-security stretch/updates/main amd64 curl amd64 7.52.1-5+deb9u11 [227 kB]
Get:4 http://deb.debian.org/debian stretch/main amd64 libssl1.1 amd64 1.1.0l-1~deb9u1 [1358 kB]
Get:5 http://deb.debian.org/debian stretch/main amd64 libgmp10 amd64 2:6.1.2+dfsg-1 [253 kB]
Get:6 http://deb.debian.org/debian stretch/main amd64 libnettle6 amd64 3.3-1+b2 [192 kB]
Get:7 http://deb.debian.org/debian stretch/main amd64 libhogweed4 amd64 3.3-1+b2 [136 kB]
Get:8 http://deb.debian.org/debian stretch/main amd64 libidn11 amd64 1.33-1+deb9u1 [115 kB]
Get:9 http://deb.debian.org/debian stretch/main amd64 libffi6 amd64 3.2.1-6 [20.4 kB]
Get:10 http://deb.debian.org/debian stretch/main amd64 libp11-kit0 amd64 0.23.3-2 [111 kB]
Get:11 http://deb.debian.org/debian stretch/main amd64 libtasn1-6 amd64 4.10-1.1+deb9u1 [50.6 kB]
Get:12 http://deb.debian.org/debian stretch/main amd64 libgnutls30 amd64 3.5.8-5+deb9u5 [896 kB]
Get:13 http://deb.debian.org/debian stretch/main amd64 libkeyutils1 amd64 1.5.9-9 [12.4 kB]
Get:14 http://deb.debian.org/debian stretch/main amd64 libkrb5support0 amd64 1.15-1+deb9u1 [61.9 kB]
Get:15 http://deb.debian.org/debian stretch/main amd64 libk5crypto3 amd64 1.15-1+deb9u1 [119 kB]
Get:16 http://deb.debian.org/debian stretch/main amd64 libkrb5-3 amd64 1.15-1+deb9u1 [311 kB]
Get:17 http://deb.debian.org/debian stretch/main amd64 libgssapi-krb5-2 amd64 1.15-1+deb9u1 [155 kB]
Get:18 http://deb.debian.org/debian stretch/main amd64 libsasl2-modules-db amd64 2.1.27~101-g0780600+dfsg-3+deb9u1 [68.4 kB]
Get:19 http://deb.debian.org/debian stretch/main amd64 libsasl2-2 amd64 2.1.27~101-g0780600+dfsg-3+deb9u1 [105 kB]
Get:20 http://deb.debian.org/debian stretch/main amd64 libldap-common all 2.4.44+dfsg-5+deb9u4 [85.7 kB]
Get:21 http://deb.debian.org/debian stretch/main amd64 libldap-2.4-2 amd64 2.4.44+dfsg-5+deb9u4 [219 kB]
Get:22 http://deb.debian.org/debian stretch/main amd64 openssl amd64 1.1.0l-1~deb9u1 [749 kB]
Get:23 http://deb.debian.org/debian stretch/main amd64 ca-certificates all 20200601~deb9u1 [160 kB]
Get:24 http://deb.debian.org/debian stretch/main amd64 libunistring0 amd64 0.9.6+really0.9.3-0.1 [279 kB]
Get:25 http://deb.debian.org/debian stretch/main amd64 libidn2-0 amd64 0.16-1+deb9u1 [60.7 kB]
Get:26 http://deb.debian.org/debian stretch/main amd64 libnghttp2-14 amd64 1.18.1-1+deb9u1 [79.2 kB]
Get:27 http://deb.debian.org/debian stretch/main amd64 libpsl5 amd64 0.17.0-3 [41.8 kB]
Get:28 http://deb.debian.org/debian stretch/main amd64 librtmp1 amd64 2.4+20151223.gitfa8646d.1-1+b1 [60.4 kB]
Get:29 http://deb.debian.org/debian stretch/main amd64 libssh2-1 amd64 1.7.0-1+deb9u1 [139 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 7664 kB in 1s (6894 kB/s)
Selecting previously unselected package libssl1.0.2:amd64.
(Reading database ... 6366 files and directories currently installed.)
Preparing to unpack .../00-libssl1.0.2_1.0.2u-1~deb9u1_amd64.deb ...
Unpacking libssl1.0.2:amd64 (1.0.2u-1~deb9u1) ...
Selecting previously unselected package libssl1.1:amd64.
Preparing to unpack .../01-libssl1.1_1.1.0l-1~deb9u1_amd64.deb ...
Unpacking libssl1.1:amd64 (1.1.0l-1~deb9u1) ...
Selecting previously unselected package libgmp10:amd64.
Preparing to unpack .../02-libgmp10_2%3a6.1.2+dfsg-1_amd64.deb ...
Unpacking libgmp10:amd64 (2:6.1.2+dfsg-1) ...
Selecting previously unselected package libnettle6:amd64.
Preparing to unpack .../03-libnettle6_3.3-1+b2_amd64.deb ...
Unpacking libnettle6:amd64 (3.3-1+b2) ...
Selecting previously unselected package libhogweed4:amd64.
Preparing to unpack .../04-libhogweed4_3.3-1+b2_amd64.deb ...
Unpacking libhogweed4:amd64 (3.3-1+b2) ...
Selecting previously unselected package libidn11:amd64.
Preparing to unpack .../05-libidn11_1.33-1+deb9u1_amd64.deb ...
Unpacking libidn11:amd64 (1.33-1+deb9u1) ...
Selecting previously unselected package libffi6:amd64.
Preparing to unpack .../06-libffi6_3.2.1-6_amd64.deb ...
Unpacking libffi6:amd64 (3.2.1-6) ...
Selecting previously unselected package libp11-kit0:amd64.
Preparing to unpack .../07-libp11-kit0_0.23.3-2_amd64.deb ...
Unpacking libp11-kit0:amd64 (0.23.3-2) ...
Selecting previously unselected package libtasn1-6:amd64.
Preparing to unpack .../08-libtasn1-6_4.10-1.1+deb9u1_amd64.deb ...
Unpacking libtasn1-6:amd64 (4.10-1.1+deb9u1) ...
Selecting previously unselected package libgnutls30:amd64.
Preparing to unpack .../09-libgnutls30_3.5.8-5+deb9u5_amd64.deb ...
Unpacking libgnutls30:amd64 (3.5.8-5+deb9u5) ...
Selecting previously unselected package libkeyutils1:amd64.
Preparing to unpack .../10-libkeyutils1_1.5.9-9_amd64.deb ...
Unpacking libkeyutils1:amd64 (1.5.9-9) ...
Selecting previously unselected package libkrb5support0:amd64.
Preparing to unpack .../11-libkrb5support0_1.15-1+deb9u1_amd64.deb ...
Unpacking libkrb5support0:amd64 (1.15-1+deb9u1) ...
Selecting previously unselected package libk5crypto3:amd64.
Preparing to unpack .../12-libk5crypto3_1.15-1+deb9u1_amd64.deb ...
Unpacking libk5crypto3:amd64 (1.15-1+deb9u1) ...
Selecting previously unselected package libkrb5-3:amd64.
Preparing to unpack .../13-libkrb5-3_1.15-1+deb9u1_amd64.deb ...
Unpacking libkrb5-3:amd64 (1.15-1+deb9u1) ...
Selecting previously unselected package libgssapi-krb5-2:amd64.
Preparing to unpack .../14-libgssapi-krb5-2_1.15-1+deb9u1_amd64.deb ...
Unpacking libgssapi-krb5-2:amd64 (1.15-1+deb9u1) ...
Selecting previously unselected package libsasl2-modules-db:amd64.
Preparing to unpack .../15-libsasl2-modules-db_2.1.27~101-g0780600+dfsg-3+deb9u1_amd64.deb ...
Unpacking libsasl2-modules-db:amd64 (2.1.27~101-g0780600+dfsg-3+deb9u1) ...
Selecting previously unselected package libsasl2-2:amd64.
Preparing to unpack .../16-libsasl2-2_2.1.27~101-g0780600+dfsg-3+deb9u1_amd64.deb ...
Unpacking libsasl2-2:amd64 (2.1.27~101-g0780600+dfsg-3+deb9u1) ...
Selecting previously unselected package libldap-common.
Preparing to unpack .../17-libldap-common_2.4.44+dfsg-5+deb9u4_all.deb ...
Unpacking libldap-common (2.4.44+dfsg-5+deb9u4) ...
Selecting previously unselected package libldap-2.4-2:amd64.
Preparing to unpack .../18-libldap-2.4-2_2.4.44+dfsg-5+deb9u4_amd64.deb ...
Unpacking libldap-2.4-2:amd64 (2.4.44+dfsg-5+deb9u4) ...
Selecting previously unselected package openssl.
Preparing to unpack .../19-openssl_1.1.0l-1~deb9u1_amd64.deb ...
Unpacking openssl (1.1.0l-1~deb9u1) ...
Selecting previously unselected package ca-certificates.
Preparing to unpack .../20-ca-certificates_20200601~deb9u1_all.deb ...
Unpacking ca-certificates (20200601~deb9u1) ...
Selecting previously unselected package libunistring0:amd64.
Preparing to unpack .../21-libunistring0_0.9.6+really0.9.3-0.1_amd64.deb ...
Unpacking libunistring0:amd64 (0.9.6+really0.9.3-0.1) ...
Selecting previously unselected package libidn2-0:amd64.
Preparing to unpack .../22-libidn2-0_0.16-1+deb9u1_amd64.deb ...
Unpacking libidn2-0:amd64 (0.16-1+deb9u1) ...
Selecting previously unselected package libnghttp2-14:amd64.
Preparing to unpack .../23-libnghttp2-14_1.18.1-1+deb9u1_amd64.deb ...
Unpacking libnghttp2-14:amd64 (1.18.1-1+deb9u1) ...
Selecting previously unselected package libpsl5:amd64.
Preparing to unpack .../24-libpsl5_0.17.0-3_amd64.deb ...
Unpacking libpsl5:amd64 (0.17.0-3) ...
Selecting previously unselected package librtmp1:amd64.
Preparing to unpack .../25-librtmp1_2.4+20151223.gitfa8646d.1-1+b1_amd64.deb ...
Unpacking librtmp1:amd64 (2.4+20151223.gitfa8646d.1-1+b1) ...
Selecting previously unselected package libssh2-1:amd64.
Preparing to unpack .../26-libssh2-1_1.7.0-1+deb9u1_amd64.deb ...
Unpacking libssh2-1:amd64 (1.7.0-1+deb9u1) ...
Selecting previously unselected package libcurl3:amd64.
Preparing to unpack .../27-libcurl3_7.52.1-5+deb9u11_amd64.deb ...
Unpacking libcurl3:amd64 (7.52.1-5+deb9u11) ...
Selecting previously unselected package curl.
Preparing to unpack .../28-curl_7.52.1-5+deb9u11_amd64.deb ...
Unpacking curl (7.52.1-5+deb9u11) ...
Setting up libnettle6:amd64 (3.3-1+b2) ...
Setting up libnghttp2-14:amd64 (1.18.1-1+deb9u1) ...
Setting up libldap-common (2.4.44+dfsg-5+deb9u4) ...
Setting up libsasl2-modules-db:amd64 (2.1.27~101-g0780600+dfsg-3+deb9u1) ...
Setting up libsasl2-2:amd64 (2.1.27~101-g0780600+dfsg-3+deb9u1) ...
Setting up libtasn1-6:amd64 (4.10-1.1+deb9u1) ...
Setting up libssl1.0.2:amd64 (1.0.2u-1~deb9u1) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Setting up libgmp10:amd64 (2:6.1.2+dfsg-1) ...
Setting up libssh2-1:amd64 (1.7.0-1+deb9u1) ...
Processing triggers for libc-bin (2.24-11+deb9u4) ...
Setting up libunistring0:amd64 (0.9.6+really0.9.3-0.1) ...
Setting up libssl1.1:amd64 (1.1.0l-1~deb9u1) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Setting up openssl (1.1.0l-1~deb9u1) ...
Setting up libffi6:amd64 (3.2.1-6) ...
Setting up libkeyutils1:amd64 (1.5.9-9) ...
Setting up ca-certificates (20200601~deb9u1) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Updating certificates in /etc/ssl/certs...
126 added, 0 removed; done.
Setting up libidn11:amd64 (1.33-1+deb9u1) ...
Setting up libidn2-0:amd64 (0.16-1+deb9u1) ...
Setting up libpsl5:amd64 (0.17.0-3) ...
Setting up libkrb5support0:amd64 (1.15-1+deb9u1) ...
Setting up libhogweed4:amd64 (3.3-1+b2) ...
Setting up libp11-kit0:amd64 (0.23.3-2) ...
Setting up libk5crypto3:amd64 (1.15-1+deb9u1) ...
Setting up libgnutls30:amd64 (3.5.8-5+deb9u5) ...
Setting up librtmp1:amd64 (2.4+20151223.gitfa8646d.1-1+b1) ...
Setting up libldap-2.4-2:amd64 (2.4.44+dfsg-5+deb9u4) ...
Setting up libkrb5-3:amd64 (1.15-1+deb9u1) ...
Setting up libgssapi-krb5-2:amd64 (1.15-1+deb9u1) ...
Setting up libcurl3:amd64 (7.52.1-5+deb9u11) ...
Setting up curl (7.52.1-5+deb9u11) ...
Processing triggers for libc-bin (2.24-11+deb9u4) ...
Processing triggers for ca-certificates (20200601~deb9u1) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
+ curl -fSL https://github.com/krallin/tini/releases/download/v0.9.0/tini -o /usr/local/bin/tini
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   615  100   615    0     0   1252      0 --:--:-- --:--:-- --:--:--  1255
100 18728  100 18728    0     0  13742      0  0:00:01  0:00:01 --:--:-- 45456
+ curl -fSL https://github.com/krallin/tini/releases/download/v0.9.0/tini.asc -o /usr/local/bin/tini.asc
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   619  100   619    0     0   1138      0 --:--:-- --:--:-- --:--:--  1137
100   836  100   836    0     0    683      0  0:00:01  0:00:01 --:--:--   683
+ mktemp -d
+ export GNUPGHOME=/tmp/tmp.7TwfzWxFoc
+ gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 6380DC428747F6C393FEACA59A84159D7001A4E5
/bin/sh: 1: gpg: not found
The command '/bin/sh -c set -x 	&& apt-get update && apt-get install -y ca-certificates curl 		--no-install-recommends 	&& curl -fSL "https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini" -o /usr/local/bin/tini 	&& curl -fSL "https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini.asc" -o /usr/local/bin/tini.asc 	&& export GNUPGHOME="$(mktemp -d)" && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 6380DC428747F6C393FEACA59A84159D7001A4E5 	&& gpg --batch --verify /usr/local/bin/tini.asc /usr/local/bin/tini 	&& rm -r "$GNUPGHOME" /usr/local/bin/tini.asc 	&& chmod +x /usr/local/bin/tini 	&& tini -h 	&& apt-get purge --auto-remove -y ca-certificates curl 	&& rm -rf /var/lib/apt/lists/*' returned a non-zero code: 127
@p-mongo
Copy link

p-mongo commented Oct 12, 2020

Confirming the issue, here is a build transcript: https://gist.github.com/p-mongo/9bb724c0ad1d04f2af52cc1c3595391b

dozoisch added a commit that referenced this issue Oct 12, 2020
Fixed Issue #590: docker build fails, gpg not found
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants