docker: add verification script to production image

The verification script makes sure the hashes of the binaries inside of
a docker image match those of an official release.
The script first downloads all signatures, validates them, then compares
the hashes of the installed binaries to those contained in the detached
signature files.
This commit is contained in:
Oliver Gugger committed 2021-01-14 21:48:32 +01:00
1 parent 25ac071300
commit 97a141e7af
2 files changed
+154 -2

No files matched your search

+6 -2
View File
@@ -31,15 +31,19 @@ FROM alpine as final
# Define a root volume for data persistence.
VOLUME /root/.lnd
# Add bash, jq and ca-certs, for quality of life and SSL-related reasons.
# Add utilities for quality of life and SSL-related reasons. We also require
# curl and gpg for the signature verification script.
RUN apk --no-cache add \
bash \
jq \
ca-certificates
ca-certificates \
gnupg \
curl
# Copy the binaries from the builder image.
COPY --from=builder /go/bin/lncli /bin/
COPY --from=builder /go/bin/lnd /bin/
COPY --from=builder /go/src/github.com/lightningnetwork/lnd/scripts/verify-install.sh /
# Store the SHA256 hash of the binaries that were just produced for later
# verification.