From 577636aa342b172b719cd8f835c7324a64de40a4 Mon Sep 17 00:00:00 2001 From: Damien Goutte-Gattat Date: Wed, 2 Aug 2023 15:34:27 +0100 Subject: [PATCH] Use variables for software versions. When it was not already done, make sure to use variables declared at the beginning of the Dockerfile to hold the version number of the various programs we install. --- Dockerfile | 7 +++++-- docker/builder/Dockerfile | 22 ++++++++++++---------- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6a8bfac3..b091c7e8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,9 @@ ENV PATH "/tools/apache-jena/bin:/tools/sparqlprog/bin:$PATH" ARG ODK_VERSION 0.0.0 ENV ODK_VERSION $ODK_VERSION +# Software versions +ENV JENA_VERSION=4.9.0 + # Avoid repeated downloads of script dependencies by mounting the local coursier cache: # docker run -v $HOME/.coursier/cache/v1:/tools/.coursier-cache ... ENV COURSIER_CACHE "/tools/.coursier-cache" @@ -75,8 +78,8 @@ RUN test "x$TARGETARCH" = xamd64 && ( \ ) # Install Jena. -RUN wget -nv http://archive.apache.org/dist/jena/binaries/apache-jena-4.9.0.tar.gz -O- | tar xzC /tools && \ - mv /tools/apache-jena-4.9.0 /tools/apache-jena +RUN wget -nv http://archive.apache.org/dist/jena/binaries/apache-jena-$JENA_VERSION.tar.gz -O- | tar xzC /tools && \ + mv /tools/apache-jena-$JENA_VERSION /tools/apache-jena # Install SPARQLProg. RUN swipl -g "pack_install(sparqlprog, [interactive(false)])" -g halt && \ diff --git a/docker/builder/Dockerfile b/docker/builder/Dockerfile index 0ad66d6e..b5bdb536 100644 --- a/docker/builder/Dockerfile +++ b/docker/builder/Dockerfile @@ -8,6 +8,8 @@ WORKDIR /build # Software versions ENV RDFTAB_VERSION=0.1.1 +ENV SOUFFLE_VERSION=2.4 +ENV FASTOBO_VALIDATOR_VERSION=0.4.6 # Everything that we want to get into one of the final ODK images # should be installed into one of these directories. @@ -68,24 +70,24 @@ RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends mcpp \ sqlite3 \ zlib1g-dev && \ - wget -nv https://github.com/souffle-lang/souffle/archive/refs/tags/2.4.tar.gz \ - -O /build/souffle-2.4.tar.gz && \ - tar xf souffle-2.4.tar.gz && \ - cd souffle-2.4 && \ + wget -nv https://github.com/souffle-lang/souffle/archive/refs/tags/$SOUFFLE_VERSION.tar.gz \ + -O /build/souffle-$SOUFFLE_VERSION.tar.gz && \ + tar xf souffle-$SOUFFLE_VERSION.tar.gz && \ + cd souffle-$SOUFFLE_VERSION && \ cmake -S . -B build && \ cmake --build build --target install DESTDIR=/staging/full && \ cd /build && \ - rm -rf souffle-2.4 souffle-2.4.tar.gz + rm -rf souffle-$SOUFFLE_VERSION souffle-$SOUFFLE_VERSION.tar.gz # Compile Fastobo-validator. -RUN wget -nv https://github.com/fastobo/fastobo-validator/archive/refs/tags/v0.4.6.tar.gz \ - -O /build/fastobo-validator-0.4.6.tar.gz && \ - tar xf fastobo-validator-0.4.6.tar.gz && \ - cd fastobo-validator-0.4.6 && \ +RUN wget -nv https://github.com/fastobo/fastobo-validator/archive/refs/tags/v$FASTOBO_VALIDATOR_VERSION.tar.gz \ + -O /build/fastobo-validator-$FASTOBO_VALIDATOR_VERSION.tar.gz && \ + tar xf fastobo-validator-$FASTOBO_VALIDATOR_VERSION.tar.gz && \ + cd fastobo-validator-$FASTOBO_VALIDATOR_VERSION && \ cargo build --release && \ install -D -m 755 target/release/fastobo-validator /staging/full/usr/bin/fastobo-validator && \ cd /build && \ - rm -rf fastobo-validator-0.4.6 fastobo-validator-0.4.6.tar.gz /root/.cargo + rm -rf fastobo-validator-$FASTOBO_VALIDATOR_VERSION fastobo-validator-$FASTOBO_VALIDATOR_VERSION.tar.gz /root/.cargo # Compile rdftab. RUN wget -nv https://github.com/ontodev/rdftab.rs/archive/refs/tags/v$RDFTAB_VERSION.tar.gz \