From 95ec2a3f0cf57ee72df411409eb5e7d0b4671a19 Mon Sep 17 00:00:00 2001 From: "Achim D. Brucker" Date: Sun, 18 Aug 2019 16:42:12 +0100 Subject: [PATCH] Use official release archive for generating Docker images. --- build.sh | 2 +- isabelle_dof/Dockerfile | 13 +++++++++---- isabelle_dof/hooks/build | 8 +++----- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/build.sh b/build.sh index 7c9ada2..5560e5f 100755 --- a/build.sh +++ b/build.sh @@ -40,5 +40,5 @@ docker build -t logicalhacking/debian4isabelle debian4isabelle ( cd isabelle && source hooks/build) # Generate Isabelle/DOF image -# ISADOF_VERSION=1.0.0 +ISADOF_VERSION=1.0.0 ( cd isabelle_dof && source hooks/build) diff --git a/isabelle_dof/Dockerfile b/isabelle_dof/Dockerfile index d5bb305..e3b9b0e 100644 --- a/isabelle_dof/Dockerfile +++ b/isabelle_dof/Dockerfile @@ -26,9 +26,9 @@ FROM logicalhacking/isabelle2019 -ARG tag +ARG isadof_version -LABEL isadof.tag="$tag" +LABEL isadof.version="$isadof_version/Isabelle2019" SHELL ["/bin/bash", "-c"] @@ -41,8 +41,13 @@ RUN apt-get -y update && apt-get install -y imagemagick && \ rm -rf /usr/share/doc USER isabelle -RUN git clone https://git.logicalhacking.com/Isabelle_DOF/Isabelle_DOF.git && \ - (cd Isabelle_DOF && git checkout "$tag") && \ +RUN if [[ -z "$isadof_version" ]]; then \ + git clone https://git.logicalhacking.com/Isabelle_DOF/Isabelle_DOF.git && \ + (cd Isabelle_DOF && git checkout master) \ + else \ + curl -s -L https://artifacts.logicalhacking.com/releases/Isabelle_DOF/Isabelle_DOF/Isabelle_DOF-"$isadof_version"_Isabelle2019.tar.xz | tar Jxf - && \ + ln -s Isabelle_DOF-"$isadof_version"_Isabelle2019 Isabelle_DOF; \ + fi && \ (cd Isabelle_DOF && ./install) && \ (cd Isabelle_DOF && isabelle build -D .) && \ echo "ISABELLE_LOGIC=Isabelle_DOF" >> Isabelle/etc/settings && \ diff --git a/isabelle_dof/hooks/build b/isabelle_dof/hooks/build index 4eca3da..bd59d7e 100755 --- a/isabelle_dof/hooks/build +++ b/isabelle_dof/hooks/build @@ -28,12 +28,10 @@ set -e if [ -z "$ISADOF_VERSION" ] ; then - IMAGE="isadof" - TAG="master" + IMAGE="isabelle_dof" else - TAG="v"$VERSION"/Isabelle2019" - IMAGE="Isabelle_DOF-"$ISADOF_VERSION"_Isabelle2019" + IMAGE="isabelle_dof-"$ISADOF_VERSION"_isabelle2019" fi docker build -t logicalhacking/$IMAGE . \ - --build-arg tag="$TAG" + --build-arg isadof_version="$ISADOF_VERSION"