From 2f18b76b68c36c7399f0089dc342e33ed5d70c33 Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Sun, 4 Feb 2024 14:55:40 -0500 Subject: [PATCH] Add missing folder specification to Monero Dockerfile --- orchestration/src/coins/monero.rs | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/orchestration/src/coins/monero.rs b/orchestration/src/coins/monero.rs index a2dfa5639..8f6828e74 100644 --- a/orchestration/src/coins/monero.rs +++ b/orchestration/src/coins/monero.rs @@ -10,34 +10,30 @@ fn monero_internal( monero_binary: &str, ports: &str, ) { + const MONERO_VERSION: &str = "0.18.3.1"; + #[rustfmt::skip] - const DOWNLOAD_MONERO: &str = r#" + let download_monero = format!(r#" FROM alpine:latest as monero -# https://downloads.getmonero.org/cli/monero-linux-x64-v0.18.3.1.tar.bz2 -# Verification will fail if MONERO_VERSION doesn't match the latest -# due to the way monero publishes releases. They overwrite a single hashes.txt -# file with each release, meaning we can only grab the SHA256 of the latest -# release. -# Most publish a asc file for each release / build architecture ¯\_(ツ)_/¯ -ENV MONERO_VERSION=0.18.3.1 - RUN apk --no-cache add gnupg # Download Monero -RUN wget https://downloads.getmonero.org/cli/monero-linux-x64-v${MONERO_VERSION}.tar.bz2 +RUN wget https://downloads.getmonero.org/cli/monero-linux-x64-v{MONERO_VERSION}.tar.bz2 # Verify Binary -- fingerprint from https://github.com/monero-project/monero-site/issues/1949 -ADD orchestration/coins/monero/hashes-v${MONERO_VERSION}.txt . +ADD orchestration/{}/coins/monero/hashes-v{MONERO_VERSION}.txt . RUN gpg --keyserver hkp://keyserver.ubuntu.com:80 --keyserver-options no-self-sigs-only --receive-keys 81AC591FE9C4B65C5806AFC3F0AF4D462A0BDF92 && \ - gpg --verify hashes-v${MONERO_VERSION}.txt && \ - grep "$(sha256sum monero-linux-x64-v${MONERO_VERSION}.tar.bz2 | cut -c 1-64)" hashes-v${MONERO_VERSION}.txt + gpg --verify hashes-v{MONERO_VERSION}.txt && \ + grep "$(sha256sum monero-linux-x64-v{MONERO_VERSION}.tar.bz2 | cut -c 1-64)" hashes-v{MONERO_VERSION}.txt # Extract it -RUN tar -xvjf monero-linux-x64-v${MONERO_VERSION}.tar.bz2 --strip-components=1 -"#; +RUN tar -xvjf monero-linux-x64-v{MONERO_VERSION}.tar.bz2 --strip-components=1 +"#, + network.folder(), + ); - let setup = mimalloc(os).to_string() + DOWNLOAD_MONERO; + let setup = mimalloc(os).to_string() + &download_monero; let run_monero = format!( r#" @@ -48,7 +44,7 @@ EXPOSE {ports} ADD /orchestration/{}/coins/{folder}/run.sh / CMD ["/run.sh"] "#, - network.folder() + network.folder(), ); let run =