Skip to content

Commit

Permalink
update download check
Browse files Browse the repository at this point in the history
  • Loading branch information
netsandbox committed Jan 4, 2025
1 parent d707fd8 commit f871075
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 12 deletions.
10 changes: 8 additions & 2 deletions 4.4/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,16 @@ LABEL org.opencontainers.image.authors="Christian Loos <[email protected]>"

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

RUN gpg --keyserver keyserver.ubuntu.com --recv-keys C49B372F2BF84A19011660270DF0A283FEAC80B2 \
&& gpg --list-keys

WORKDIR /usr/local/src

# hadolint ignore=DL3003,SC2174
RUN curl -fsSL "https://download.bestpractical.com/pub/rt/release/rt-4.4.7.tar.gz" -o rt.tar.gz \
&& echo "47af1651d5df3f25b6374ff6c1da71c66202d61919d9431c17259fa3df69ae59 rt.tar.gz" | sha256sum -c \
RUN curl -fsSL \
-o rt.tar.gz https://download.bestpractical.com/pub/rt/release/rt-4.4.7.tar.gz \
-o rt.tar.gz.asc https://download.bestpractical.com/pub/rt/release/rt-4.4.7.tar.gz.asc \
&& gpg --verify rt.tar.gz.asc rt.tar.gz \
&& tar -xzf rt.tar.gz \
&& cd rt-4.4.7 \
&& ./configure \
Expand Down
10 changes: 8 additions & 2 deletions 5.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,16 @@ LABEL org.opencontainers.image.authors="Christian Loos <[email protected]>"

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

RUN gpg --keyserver keyserver.ubuntu.com --recv-keys C49B372F2BF84A19011660270DF0A283FEAC80B2 \
&& gpg --list-keys

WORKDIR /usr/local/src

# hadolint ignore=DL3003,SC2174
RUN curl -fsSL "https://download.bestpractical.com/pub/rt/release/rt-5.0.7.tar.gz" -o rt.tar.gz \
&& echo "1a1a4838979f08c58e67642686e4fd980e1f4ee98e144ff8a56f870f37162cce rt.tar.gz" | sha256sum -c \
RUN curl -fsSL \
-o rt.tar.gz https://download.bestpractical.com/pub/rt/release/rt-5.0.7.tar.gz \
-o rt.tar.gz.asc https://download.bestpractical.com/pub/rt/release/rt-5.0.7.tar.gz.asc \
&& gpg --verify rt.tar.gz.asc rt.tar.gz \
&& tar -xzf rt.tar.gz \
&& cd rt-5.0.7 \
&& ./configure \
Expand Down
10 changes: 8 additions & 2 deletions Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,16 @@ LABEL org.opencontainers.image.authors="Christian Loos <[email protected]>"

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

RUN gpg --keyserver keyserver.ubuntu.com --recv-keys C49B372F2BF84A19011660270DF0A283FEAC80B2 \
&& gpg --list-keys

WORKDIR /usr/local/src

# hadolint ignore=DL3003,SC2174
RUN curl -fsSL "https://download.bestpractical.com/pub/rt/%%RT_RELEASE%%/rt-%%RT_VERSION%%.tar.gz" -o rt.tar.gz \
&& echo "%%RT_SHA%% rt.tar.gz" | sha256sum -c \
RUN curl -fsSL \
-o rt.tar.gz https://download.bestpractical.com/pub/rt/%%RT_RELEASE%%/rt-%%RT_VERSION%%.tar.gz \
-o rt.tar.gz.asc https://download.bestpractical.com/pub/rt/%%RT_RELEASE%%/rt-%%RT_VERSION%%.tar.gz.asc \
&& gpg --verify rt.tar.gz.asc rt.tar.gz \
&& tar -xzf rt.tar.gz \
&& cd rt-%%RT_VERSION%% \
&& ./configure \
Expand Down
8 changes: 2 additions & 6 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@

set -Eeuo pipefail

declare -A versions=(
[4.4.7]='47af1651d5df3f25b6374ff6c1da71c66202d61919d9431c17259fa3df69ae59'
[5.0.7]='1a1a4838979f08c58e67642686e4fd980e1f4ee98e144ff8a56f870f37162cce'
)
declare -a versions=("4.4.7" "5.0.7")

for version in "${!versions[@]}"; do
for version in "${versions[@]}"; do
version_major_minor=${version%.*}

mkdir -p "$version_major_minor"
Expand All @@ -23,7 +20,6 @@ for version in "${!versions[@]}"; do

sed -i \
-e "s/%%RT_RELEASE%%/$release/" \
-e "s/%%RT_SHA%%/${versions[$version]}/" \
-e "s/%%RT_VERSION_MAJOR%%/${version%%.*}/" \
-e "s/%%RT_VERSION%%/$version/" \
"$version_major_minor"/docker-entrypoint.sh "$version_major_minor"/Dockerfile
Expand Down

0 comments on commit f871075

Please sign in to comment.