joinmarket-webui / jam-docker

https://jamdocs.org
MIT License
14 stars 7 forks source link

Standalone image cannot be compiled #131

Closed btclinux closed 1 month ago

btclinux commented 2 months ago
docker build --label "local" \
        --build-arg JAM_REPO_REF=master \
        --build-arg JM_SERVER_REPO_REF=master \
        --tag "joinmarket-webui/jam-standalone" ./standalone
[+] Building 33.0s (17/32)                                                                                                                                                                                                   docker:default
 => [internal] load build definition from Dockerfile                                                                                                                                                                                   0.0s
 => => transferring dockerfile: 4.57kB                                                                                                                                                                                                 0.0s
 => [internal] load metadata for docker.io/library/alpine:3.19.1                                                                                                                                                                       1.1s
 => [internal] load metadata for docker.io/library/debian:bullseye-20240211-slim                                                                                                                                                       1.1s
 => [internal] load .dockerignore                                                                                                                                                                                                      0.0s
 => => transferring context: 2B                                                                                                                                                                                                        0.0s
 => [internal] load build context                                                                                                                                                                                                      0.0s
 => => transferring context: 28.29kB                                                                                                                                                                                                   0.0s
 => [builder-base 1/2] FROM docker.io/library/alpine:3.19.1@sha256:c5b1261d6d3e43071626931fc004f70149baeba2c8ec672bd4f27761f8e1ad6b                                                                                                    0.0s
 => CACHED [dinit-builder 1/4] FROM docker.io/library/debian:bullseye-20240211-slim@sha256:c6d9e246479d56687c1a579a7a0336956a5ce6f2bc26bd7925b0c7405e81dbff                                                                            0.0s
 => CACHED [dinit-builder 2/4] RUN apt-get update     && apt-get install -qq --no-install-recommends --no-install-suggests -y ca-certificates git gcc make m4 g++                                                                      0.0s
 => CACHED [dinit-builder 3/4] WORKDIR /usr/src/dinit                                                                                                                                                                                  0.0s
 => CACHED [builder-base 2/2] RUN apk add --no-cache --update git                                                                                                                                                                      0.0s
 => CACHED [ui-builder 1/3] RUN apk add --no-cache --update nodejs npm                                                                                                                                                                 0.0s
 => CACHED [ui-builder 2/3] WORKDIR /usr/src/jam                                                                                                                                                                                       0.0s
 => CACHED [server-builder 1/2] WORKDIR /usr/src/joinmarket-clientserver                                                                                                                                                               0.0s
 => CACHED [server-builder 2/2] RUN git clone "https://github.com/JoinMarket-Org/joinmarket-clientserver" . --depth=1 --branch "master"                                                                                                0.0s
 => CANCELED [dinit-builder 4/4] RUN git clone "https://github.com/davmac314/dinit" . --depth=1 --branch "v0.18.0"     && make     && export ASAN_OPTIONS=detect_leaks=0     && make check     && make check-igr     && mkdir dinit-  30.8s
 => CANCELED [ui-builder 3/3] RUN git clone "https://github.com/joinmarket-webui/jam" . --depth=1 --branch "master"     && npm install --no-fund --no-audit     && npm run build                                                      31.8s
 => ERROR [stage-4  2/17] RUN addgroup --system tor     && adduser --system --disabled-login --ingroup tor --gecos 'tor user' tor     && apt-get update     && apt-get install -qq --no-install-recommends --no-install-suggests -y   30.7s
------                                                                                                                                                                                                                                      
 > [stage-4  2/17] RUN addgroup --system tor     && adduser --system --disabled-login --ingroup tor --gecos 'tor user' tor     && apt-get update     && apt-get install -qq --no-install-recommends --no-install-suggests -y gnupg curl apt-transport-https ca-certificates     && curl --silent https://nginx.org/keys/nginx_signing.key |     gpg --dearmor | tee /usr/share/keyrings/nginx-archive-keyring.gpg > /dev/null     && sh -c "echo 'deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://nginx.org/packages/mainline/debian/ bullseye nginx' > /etc/apt/sources.list.d/nginx.list"     && curl --silent https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc |     gpg --dearmor | tee /usr/share/keyrings/tor-archive-keyring.gpg > /dev/null     && sh -c "echo 'deb [signed-by=/usr/share/keyrings/tor-archive-keyring.gpg] https://deb.torproject.org/torproject.org bullseye main' > /etc/apt/sources.list.d/tor.list"     && apt-get update     && apt-get install -qq --no-install-recommends --no-install-suggests -y     tini iproute2 procps vim jq     build-essential automake pkg-config libtool libltdl-dev python3-dev python3-pip python3-setuptools python3-venv     tor     deb.torproject.org-keyring     nginx     && apt-get clean     && rm --recursive --force /var/lib/apt/lists/*:                                                                                            
0.260 Adding group `tor' (GID 101) ...                                                                                                                                                                                                      
0.270 Done.                                                                                                                                                                                                                                 
0.293 Adding system user `tor' (UID 101) ...                                                                                                                                                                                                
0.293 Adding new user `tor' (UID 101) with group `tor' ...                                                                                                                                                                                  
0.319 Creating home directory `/home/tor' ...                                                                                                                                                                                               
0.505 Get:1 http://deb.debian.org/debian bullseye InRelease [116 kB]                                                                                                                                                                        
0.811 Get:2 http://deb.debian.org/debian-security bullseye-security InRelease [27.2 kB]                                                                                                                                                     
0.907 Get:3 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]                                                                                                                                                               
1.010 Get:4 http://deb.debian.org/debian bullseye/main amd64 Packages [8066 kB]                                                                                                                                                             
1.867 Get:5 http://deb.debian.org/debian-security bullseye-security/main amd64 Packages [295 kB]                                                                                                                                            
1.956 Get:6 http://deb.debian.org/debian bullseye-updates/main amd64 Packages [18.8 kB]                                                                                                                                                     
2.886 Fetched 8567 kB in 3s (3356 kB/s)
2.886 Reading package lists...
6.130 debconf: delaying package configuration, since apt-utils is not installed
6.175 Selecting previously unselected package readline-common.
(Reading database ... 6670 files and directories currently installed.)
6.181 Preparing to unpack .../00-readline-common_8.1-1_all.deb ...
6.183 Unpacking readline-common (8.1-1) ...
6.207 Selecting previously unselected package libreadline8:amd64.
6.208 Preparing to unpack .../01-libreadline8_8.1-1_amd64.deb ...
6.212 Unpacking libreadline8:amd64 (8.1-1) ...
6.242 Selecting previously unselected package openssl.
6.243 Preparing to unpack .../02-openssl_1.1.1w-0+deb11u1_amd64.deb ...
6.245 Unpacking openssl (1.1.1w-0+deb11u1) ...
6.332 Selecting previously unselected package ca-certificates.
6.333 Preparing to unpack .../03-ca-certificates_20210119_all.deb ...
6.335 Unpacking ca-certificates (20210119) ...
6.369 Selecting previously unselected package apt-transport-https.
6.370 Preparing to unpack .../04-apt-transport-https_2.2.4_all.deb ...
6.372 Unpacking apt-transport-https (2.2.4) ...
6.397 Selecting previously unselected package libbrotli1:amd64.
6.398 Preparing to unpack .../05-libbrotli1_1.0.9-2+b2_amd64.deb ...
6.400 Unpacking libbrotli1:amd64 (1.0.9-2+b2) ...
6.438 Selecting previously unselected package libsasl2-modules-db:amd64.
6.440 Preparing to unpack .../06-libsasl2-modules-db_2.1.27+dfsg-2.1+deb11u1_amd64.deb ...
6.441 Unpacking libsasl2-modules-db:amd64 (2.1.27+dfsg-2.1+deb11u1) ...
6.465 Selecting previously unselected package libsasl2-2:amd64.
6.466 Preparing to unpack .../07-libsasl2-2_2.1.27+dfsg-2.1+deb11u1_amd64.deb ...
6.468 Unpacking libsasl2-2:amd64 (2.1.27+dfsg-2.1+deb11u1) ...
6.496 Selecting previously unselected package libldap-2.4-2:amd64.
6.497 Preparing to unpack .../08-libldap-2.4-2_2.4.57+dfsg-3+deb11u1_amd64.deb ...
6.499 Unpacking libldap-2.4-2:amd64 (2.4.57+dfsg-3+deb11u1) ...
6.539 Selecting previously unselected package libnghttp2-14:amd64.
6.540 Preparing to unpack .../09-libnghttp2-14_1.43.0-1+deb11u2_amd64.deb ...
6.542 Unpacking libnghttp2-14:amd64 (1.43.0-1+deb11u2) ...
6.568 Selecting previously unselected package libpsl5:amd64.
6.569 Preparing to unpack .../10-libpsl5_0.21.0-1.2_amd64.deb ...
6.571 Unpacking libpsl5:amd64 (0.21.0-1.2) ...
6.594 Selecting previously unselected package librtmp1:amd64.
6.595 Preparing to unpack .../11-librtmp1_2.4+20151223.gitfa8646d.1-2+b2_amd64.deb ...
6.597 Unpacking librtmp1:amd64 (2.4+20151223.gitfa8646d.1-2+b2) ...
6.621 Selecting previously unselected package libssh2-1:amd64.
6.623 Preparing to unpack .../12-libssh2-1_1.9.0-2+deb11u1_amd64.deb ...
6.625 Unpacking libssh2-1:amd64 (1.9.0-2+deb11u1) ...
6.655 Selecting previously unselected package libcurl4:amd64.
6.656 Preparing to unpack .../13-libcurl4_7.74.0-1.3+deb11u13_amd64.deb ...
6.658 Unpacking libcurl4:amd64 (7.74.0-1.3+deb11u13) ...
6.698 Selecting previously unselected package curl.
6.699 Preparing to unpack .../14-curl_7.74.0-1.3+deb11u13_amd64.deb ...
6.701 Unpacking curl (7.74.0-1.3+deb11u13) ...
6.737 Selecting previously unselected package libassuan0:amd64.
6.738 Preparing to unpack .../15-libassuan0_2.5.3-7.1_amd64.deb ...
6.740 Unpacking libassuan0:amd64 (2.5.3-7.1) ...
6.762 Selecting previously unselected package gpgconf.
6.764 Preparing to unpack .../16-gpgconf_2.2.27-2+deb11u2_amd64.deb ...
6.766 Unpacking gpgconf (2.2.27-2+deb11u2) ...
6.801 Selecting previously unselected package libksba8:amd64.
6.803 Preparing to unpack .../17-libksba8_1.5.0-3+deb11u2_amd64.deb ...
6.805 Unpacking libksba8:amd64 (1.5.0-3+deb11u2) ...
6.835 Selecting previously unselected package libnpth0:amd64.
6.837 Preparing to unpack .../18-libnpth0_1.6-3_amd64.deb ...
6.839 Unpacking libnpth0:amd64 (1.6-3) ...
6.860 Selecting previously unselected package dirmngr.
6.862 Preparing to unpack .../19-dirmngr_2.2.27-2+deb11u2_amd64.deb ...
6.873 Unpacking dirmngr (2.2.27-2+deb11u2) ...
6.922 Selecting previously unselected package gnupg-l10n.
6.923 Preparing to unpack .../20-gnupg-l10n_2.2.27-2+deb11u2_all.deb ...
6.925 Unpacking gnupg-l10n (2.2.27-2+deb11u2) ...
7.013 Selecting previously unselected package gnupg-utils.
7.014 Preparing to unpack .../21-gnupg-utils_2.2.27-2+deb11u2_amd64.deb ...
7.016 Unpacking gnupg-utils (2.2.27-2+deb11u2) ...
7.080 Selecting previously unselected package libsqlite3-0:amd64.
7.081 Preparing to unpack .../22-libsqlite3-0_3.34.1-3_amd64.deb ...
7.083 Unpacking libsqlite3-0:amd64 (3.34.1-3) ...
7.158 Selecting previously unselected package gpg.
7.159 Preparing to unpack .../23-gpg_2.2.27-2+deb11u2_amd64.deb ...
7.161 Unpacking gpg (2.2.27-2+deb11u2) ...
7.225 Selecting previously unselected package libncursesw6:amd64.
7.226 Preparing to unpack .../24-libncursesw6_6.2+20201114-2+deb11u2_amd64.deb ...
7.228 Unpacking libncursesw6:amd64 (6.2+20201114-2+deb11u2) ...
7.258 Selecting previously unselected package pinentry-curses.
7.259 Preparing to unpack .../25-pinentry-curses_1.1.0-4_amd64.deb ...
7.261 Unpacking pinentry-curses (1.1.0-4) ...
7.286 Selecting previously unselected package gpg-agent.
7.287 Preparing to unpack .../26-gpg-agent_2.2.27-2+deb11u2_amd64.deb ...
7.289 Unpacking gpg-agent (2.2.27-2+deb11u2) ...
7.331 Selecting previously unselected package gpg-wks-client.
7.332 Preparing to unpack .../27-gpg-wks-client_2.2.27-2+deb11u2_amd64.deb ...
7.334 Unpacking gpg-wks-client (2.2.27-2+deb11u2) ...
7.363 Selecting previously unselected package gpg-wks-server.
7.364 Preparing to unpack .../28-gpg-wks-server_2.2.27-2+deb11u2_amd64.deb ...
7.365 Unpacking gpg-wks-server (2.2.27-2+deb11u2) ...
7.394 Selecting previously unselected package gpgsm.
7.395 Preparing to unpack .../29-gpgsm_2.2.27-2+deb11u2_amd64.deb ...
7.396 Unpacking gpgsm (2.2.27-2+deb11u2) ...
7.440 Selecting previously unselected package gnupg.
7.441 Preparing to unpack .../30-gnupg_2.2.27-2+deb11u2_all.deb ...
7.443 Unpacking gnupg (2.2.27-2+deb11u2) ...
7.495 Setting up libksba8:amd64 (1.5.0-3+deb11u2) ...
7.501 Setting up libpsl5:amd64 (0.21.0-1.2) ...
7.507 Setting up apt-transport-https (2.2.4) ...
7.512 Setting up libbrotli1:amd64 (1.0.9-2+b2) ...
7.518 Setting up libsqlite3-0:amd64 (3.34.1-3) ...
7.523 Setting up libnghttp2-14:amd64 (1.43.0-1+deb11u2) ...
7.528 Setting up libnpth0:amd64 (1.6-3) ...
7.534 Setting up libassuan0:amd64 (2.5.3-7.1) ...
7.539 Setting up libsasl2-modules-db:amd64 (2.1.27+dfsg-2.1+deb11u1) ...
7.544 Setting up gnupg-l10n (2.2.27-2+deb11u2) ...
7.550 Setting up librtmp1:amd64 (2.4+20151223.gitfa8646d.1-2+b2) ...
7.555 Setting up libncursesw6:amd64 (6.2+20201114-2+deb11u2) ...
7.560 Setting up libsasl2-2:amd64 (2.1.27+dfsg-2.1+deb11u1) ...
7.565 Setting up libssh2-1:amd64 (1.9.0-2+deb11u1) ...
7.571 Setting up openssl (1.1.1w-0+deb11u1) ...
7.579 Setting up readline-common (8.1-1) ...
7.586 Setting up pinentry-curses (1.1.0-4) ...
7.594 Setting up libreadline8:amd64 (8.1-1) ...
7.600 Setting up libldap-2.4-2:amd64 (2.4.57+dfsg-3+deb11u1) ...
7.605 Setting up ca-certificates (20210119) ...
7.680 debconf: unable to initialize frontend: Dialog
7.680 debconf: (TERM is not set, so the dialog frontend is not usable.)
7.680 debconf: falling back to frontend: Readline
7.680 debconf: unable to initialize frontend: Readline
7.680 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.32.1 /usr/local/share/perl/5.32.1 /usr/lib/x86_64-linux-gnu/perl5/5.32 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.32 /usr/share/perl/5.32 /usr/local/lib/site_perl) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
7.680 debconf: falling back to frontend: Teletype
7.991 Updating certificates in /etc/ssl/certs...
8.479 129 added, 0 removed; done.
8.511 Setting up gpgconf (2.2.27-2+deb11u2) ...
8.517 Setting up libcurl4:amd64 (7.74.0-1.3+deb11u13) ...
8.523 Setting up curl (7.74.0-1.3+deb11u13) ...
8.529 Setting up gpg (2.2.27-2+deb11u2) ...
8.534 Setting up gnupg-utils (2.2.27-2+deb11u2) ...
8.540 Setting up gpg-agent (2.2.27-2+deb11u2) ...
9.044 Setting up gpgsm (2.2.27-2+deb11u2) ...
9.049 Setting up dirmngr (2.2.27-2+deb11u2) ...
9.182 Setting up gpg-wks-server (2.2.27-2+deb11u2) ...
9.187 Setting up gpg-wks-client (2.2.27-2+deb11u2) ...
9.192 Setting up gnupg (2.2.27-2+deb11u2) ...
9.198 Processing triggers for libc-bin (2.31-13+deb11u8) ...
9.209 Processing triggers for ca-certificates (20210119) ...
9.214 Updating certificates in /etc/ssl/certs...
9.601 0 added, 0 removed; done.
9.601 Running hooks in /etc/ca-certificates/update.d...
9.602 done.
29.97 gpg: no valid OpenPGP data found.
------
Dockerfile:75
--------------------
  74 |     
  75 | >>> RUN addgroup --system tor \
  76 | >>>     && adduser --system --disabled-login --ingroup tor --gecos 'tor user' tor \
  77 | >>>     && apt-get update \
  78 | >>>     && apt-get install -qq --no-install-recommends --no-install-suggests -y gnupg curl apt-transport-https ca-certificates \
  79 | >>>     # add nginx debian repo
  80 | >>>     && curl --silent https://nginx.org/keys/nginx_signing.key | \
  81 | >>>     gpg --dearmor | tee /usr/share/keyrings/nginx-archive-keyring.gpg > /dev/null \
  82 | >>>     && sh -c "echo 'deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://nginx.org/packages/mainline/debian/ bullseye nginx' > /etc/apt/sources.list.d/nginx.list" \
  83 | >>>     # add tor debian repo
  84 | >>>     && curl --silent https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc | \
  85 | >>>     gpg --dearmor | tee /usr/share/keyrings/tor-archive-keyring.gpg > /dev/null \
  86 | >>>     && sh -c "echo 'deb [signed-by=/usr/share/keyrings/tor-archive-keyring.gpg] https://deb.torproject.org/torproject.org bullseye main' > /etc/apt/sources.list.d/tor.list" \
  87 | >>>     # install dependencies
  88 | >>>     && apt-get update \
  89 | >>>     && apt-get install -qq --no-install-recommends --no-install-suggests -y \
  90 | >>>     # image dependencies
  91 | >>>     tini iproute2 procps vim jq \
  92 | >>>     # servers dependencies (see `install.sh`)
  93 | >>>     build-essential automake pkg-config libtool libltdl-dev python3-dev python3-pip python3-setuptools python3-venv \
  94 | >>>     # tor
  95 | >>>     tor \
  96 | >>>     deb.torproject.org-keyring \
  97 | >>>     # ui dependencies
  98 | >>>     nginx \
  99 | >>>     # cleanup 
 100 | >>>     && apt-get clean \
 101 | >>>     && rm --recursive --force /var/lib/apt/lists/*
 102 |     
--------------------
ERROR: failed to solve: process "/bin/bash -o pipefail -c addgroup --system tor     && adduser --system --disabled-login --ingroup tor --gecos 'tor user' tor     && apt-get update     && apt-get install -qq --no-install-recommends --no-install-suggests -y gnupg curl apt-transport-https ca-certificates     && curl --silent https://nginx.org/keys/nginx_signing.key |     gpg --dearmor | tee /usr/share/keyrings/nginx-archive-keyring.gpg > /dev/null     && sh -c \"echo 'deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://nginx.org/packages/mainline/debian/ bullseye nginx' > /etc/apt/sources.list.d/nginx.list\"     && curl --silent https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc |     gpg --dearmor | tee /usr/share/keyrings/tor-archive-keyring.gpg > /dev/null     && sh -c \"echo 'deb [signed-by=/usr/share/keyrings/tor-archive-keyring.gpg] https://deb.torproject.org/torproject.org bullseye main' > /etc/apt/sources.list.d/tor.list\"     && apt-get update     && apt-get install -qq --no-install-recommends --no-install-suggests -y     tini iproute2 procps vim jq     build-essential automake pkg-config libtool libltdl-dev python3-dev python3-pip python3-setuptools python3-venv     tor     deb.torproject.org-keyring     nginx     && apt-get clean     && rm --recursive --force /var/lib/apt/lists/*" did not complete successfully: exit code: 2
theborakompanioni commented 2 months ago

Hey @btclinux! Thanks for the report.

It seems the signing key from nginx or tor could not be downloaded during the setup. My humble first try would just be to build it again.. might just be a temporary hiccup? Please report back if the errors persists.

Could not reproduce here locally. Builds fine here. Although it is an unfortunate downside to be required to be online for the build to be successful. : |

btclinux commented 2 months ago

Error still persist. I can download both keys manually

theborakompanioni commented 2 months ago

Error still persist. I can download both keys manually

Hmm.. we are trying to merge #132 and #133 today.. maybe you can try it again afterwards? I'll ping you. However, I have no idea why it fails with gpg: no valid OpenPGP data found. if you can download the key manually without problems.

theborakompanioni commented 2 months ago

ping @btclinux - PRs have been merged - can you try again and report back? I contacted some people and it successfully builds on all of their machines.

btclinux commented 1 month ago

Still the same error

btclinux commented 1 month ago

The problem with this line:

[stage-5  8/28] RUN curl --silent https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc |     gpg --dearmor | tee /usr/share/keyrings/tor-archive-keyring.gpg > /dev/null:                              
20.23 gpg: no valid OpenPGP data found.

It looks like I can't access to deb.torproject.org from the docker.

curl: (6) Could not resolve host: deb.torproject.org

btclinux commented 1 month ago

Fixed by adding

{
  "dns": ["8.8.8.8"]
}

to /etc/docker/daemon.json

theborakompanioni commented 1 month ago

Hey @btclinux! Thanks for the heads-up and glad that you could resolve the issue yourself! :muscle: Closing the issue now :raised_hands: