Skip to content

Commit 936a727

Browse files
author
Claudio Raimondi
committed
Fix gpg verification, Separate download from builder stage [skip ci]
1 parent 79d8c1c commit 936a727

File tree

4 files changed

+24
-37
lines changed

4 files changed

+24
-37
lines changed

Dockerfile

Lines changed: 24 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,16 @@ RUN gpg --import gpg/* && \
5757

5858
RUN tar xzf ${LITECOIN_TARBALL} --strip-components=1
5959

60+
FROM ${BASE_DISTRO} AS base-builder
61+
62+
RUN apt-get update -qq && \
63+
apt-get install -qq -y --no-install-recommends \
64+
ca-certificates \
65+
git \
66+
gnupg \
67+
wget \
68+
python3
69+
6070
# -------------- Zlib ----------------------
6171

6272
ARG ZLIB_URL=https://github.com/madler/zlib/releases/download
@@ -65,13 +75,14 @@ ARG ZLIB_TARBALL=zlib-${ZLIB_VERSION}.tar.gz
6575

6676
WORKDIR /opt/zlib
6777

68-
ADD ${ZLIB_URL}/v${ZLIB_VERSION}/${ZLIB_TARBALL} zlib.tar.gz
69-
ADD ${ZLIB_URL}/v${ZLIB_VERSION}/${ZLIB_TARBALL}.asc zlib.tar.gz.asc
78+
ADD ${ZLIB_URL}/v${ZLIB_VERSION}/${ZLIB_TARBALL} .
79+
ADD ${ZLIB_URL}/v${ZLIB_VERSION}/${ZLIB_TARBALL}.asc .
7080
COPY gpg/zlib/ gpg/
7181

7282
RUN gpg --import gpg/* && \
73-
gpg --verify zlib.tar.gz.asc zlib.tar.gz && \
74-
sha256sum -c zlib.tar.gz.sha256 --ignore-missing
83+
gpg --verify ${ZLIB_TARBALL}.asc ${ZLIB_TARBALL}
84+
85+
#TODO: verify checksum
7586

7687
# -------------- SQLite --------------------
7788

@@ -82,7 +93,7 @@ ARG SQLITE_TARBALL=sqlite-autoconf-${SQLITE_VERSION}.tar.gz
8293

8394
WORKDIR /opt/sqlite
8495

85-
ADD ${SQLITE_URL}/${SQLITE_YEAR}/${SQLITE_TARBALL} sqlite.tar.gz
96+
ADD ${SQLITE_URL}/${SQLITE_YEAR}/${SQLITE_TARBALL} .
8697
#TODO: add sig
8798
#TODO: add gpgs
8899

@@ -96,18 +107,17 @@ ARG POSTGRES_TARBALL=postgresql-${POSTGRES_VERSION}.tar.gz
96107

97108
WORKDIR /opt/postgres
98109

99-
ADD ${POSTGRES_URL}/v${POSTGRES_VERSION}/${POSTGRES_TARBALL} postgres.tar.gz
100-
ADD ${POSTGRES_URL}/v${POSTGRES_VERSION}/${POSTGRES_TARBALL}.sha256 postgres.tar.gz.sha256
110+
ADD ${POSTGRES_URL}/v${POSTGRES_VERSION}/${POSTGRES_TARBALL} .
111+
ADD ${POSTGRES_URL}/v${POSTGRES_VERSION}/${POSTGRES_TARBALL}.sha256 .
101112
#TODO: add gpgs
102113

103114
#TODO verify gpgs
104115

105-
RUN sha256sum -c postgres.tar.gz.sha256
116+
RUN sha256sum -c ${POSTGRES_TARBALL}.sha256
106117

107-
# -------------- Rust ----------------------
108-
ADD --chmod=750 https://sh.rustup.rs /opt/install-rust.sh
118+
# -------------- Scripts ----------------------
109119

110-
# -------------- Poetry --------------------
120+
ADD --chmod=750 https://sh.rustup.rs /opt/install-rust.sh
111121
ADD --chmod=750 https://install.python-poetry.org /opt/install-poetry.py
112122

113123
# -------------- Core Lightning --------------
@@ -118,29 +128,6 @@ COPY . .
118128

119129
RUN git submodule update --init --recursive
120130

121-
WORKDIR /opt
122-
123-
FROM ${BASE_DISTRO} AS base-builder
124-
125-
RUN apt-get update -qq && \
126-
apt-get install -qq -y --no-install-recommends \
127-
ca-certificates \
128-
python3 \
129-
git \
130-
autoconf \
131-
automake \
132-
libtool \
133-
build-essential \
134-
pkg-config \
135-
libicu-dev \
136-
bison \
137-
flex \
138-
wget \
139-
jq \
140-
gettext \
141-
qemu-user-static \
142-
protobuf-compiler
143-
144131
FROM base-builder AS base-builder-linux-amd64
145132

146133
ARG target_host=x86_64-linux-gnu
@@ -182,21 +169,21 @@ RUN rustup toolchain install stable --component rustfmt --allow-downgrade
182169

183170
WORKDIR /opt/zlib
184171

185-
RUN tar xzf /opt/zlib.tar.gz --strip-components=1
172+
RUN tar xzf /opt/${ZLIB_TARBALL} --strip-components=1
186173
RUN ./configure --prefix=${QEMU_LD_PREFIX}
187174
RUN make -j
188175
RUN make install
189176

190177
WORKDIR /opt/sqlite
191178

192-
RUN tar xzf /opt/sqlite.tar.gz --strip-components=1
179+
RUN tar xzf /opt/${SQLITE_TARBALL} --strip-components=1
193180
RUN ./configure --host=${target_host} --prefix=${QEMU_LD_PREFIX} --enable-static --disable-readline --disable-threadsafe --disable-load-extension
194181
RUN make -j
195182
RUN make install
196183

197184
WORKDIR /opt/postgres
198185

199-
RUN tar xzf /opt/postgres.tar.gz --strip-components=1
186+
RUN tar xzf /opt/${POSTGRES_TARBALL} --strip-components=1
200187
RUN ./configure --prefix=${QEMU_LD_PREFIX} --without-readline
201188
RUN make install -C src/include
202189
RUN make install -C src/interfaces/libpq

gpg/bitcoin/svanstaa.gpg

-269 KB
Binary file not shown.

gpg/litecoin/david-burkett.gpg

-4.63 KB
Binary file not shown.

gpg/litecoin/davidburkett.gpg

1.17 KB
Binary file not shown.

0 commit comments

Comments
 (0)