Skip to content

Commit

Permalink
Use variables for software versions.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gouttegd committed Aug 2, 2023
1 parent 21875f9 commit 577636a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 && \
Expand Down
22 changes: 12 additions & 10 deletions docker/builder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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 \
Expand Down

0 comments on commit 577636a

Please sign in to comment.