From 35609f61c48575b8cb0483fb4b7b9da401f0d435 Mon Sep 17 00:00:00 2001 From: plowsof Date: Mon, 30 Sep 2024 11:34:23 +0100 Subject: [PATCH] verifypackages in docker file --- Dockerfile.linux | 20 +++++++++++++++++--- shared_functions.sh | 2 +- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/Dockerfile.linux b/Dockerfile.linux index e46dd620dc..35ab199612 100644 --- a/Dockerfile.linux +++ b/Dockerfile.linux @@ -1,5 +1,19 @@ #todo pin hash of shared_functions.sh -# Stage 1: Downloader + +# Stage 1: Confirm provided deb md5sums +FROM ubuntu:16.04@sha256:1f1a2d56de1d604801a9671f301190704c25d604a416f59e03c04f5c6ffee0d6 as verifypackages + +RUN apt-get update && \ + apt-get install -y gpg xz-utils wget && \ + rm -rf /var/lib/apt/lists/* + +COPY shared_functions.sh /sources/shared_functions.sh +RUN chmod +x /sources/shared_functions.sh + +# Single CMD with all required commands +RUN /bin/bash -c "source shared_functions.sh && get_packages && verify_packages" + +# Stage 2: Downloader FROM ubuntu:16.04@sha256:1f1a2d56de1d604801a9671f301190704c25d604a416f59e03c04f5c6ffee0d6 as downloader ARG THREADS=3 @@ -18,7 +32,7 @@ RUN chmod +x /sources/shared_functions.sh # Single CMD with all required commands RUN /bin/bash -c "source shared_functions.sh && get_debs_downloader && download_all_tarballs" -# Stage 2: Git Cloner +# Stage 3: Git Cloner FROM ubuntu:16.04@sha256:1f1a2d56de1d604801a9671f301190704c25d604a416f59e03c04f5c6ffee0d6 as gitcloner ARG THREADS=3 @@ -37,7 +51,7 @@ RUN /bin/bash -c "source shared_functions.sh && get_debs_gitcloner" RUN --network=none /bin/bash -c "source shared_functions.sh && install_debs_gitcloner" RUN /bin/bash -c "source shared_functions.sh && clone_git_repos" -# Stage 3: Builder +# Stage 4: Builder FROM ubuntu:16.04@sha256:1f1a2d56de1d604801a9671f301190704c25d604a416f59e03c04f5c6ffee0d6 as builder ARG THREADS=3 diff --git a/shared_functions.sh b/shared_functions.sh index a25ed2d43f..3ef46c5862 100755 --- a/shared_functions.sh +++ b/shared_functions.sh @@ -718,7 +718,7 @@ check_md5sums() { check_array debs_tarballs } -# get_packages / verify_packages adapted from featherwallet v2.2.1 +# get_packages / verify_packages adapted from featherwallet v2.1.2 BASE_URI="http://archive.ubuntu.com/ubuntu/dists" ARCH="amd64"