aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile.make
diff options
context:
space:
mode:
authorErik Martin-Dorel2020-03-08 15:22:33 +0100
committerErik Martin-Dorel2020-03-08 15:51:14 +0100
commit563f395e1a41caf4978fe9881250ec68796e36a0 (patch)
treec26905760896e833863df5c20457f8af3b42b94b /Dockerfile.make
parenta7f4eb76935157112aa844b6c5ac29a36898235f (diff)
refactor: Simplify the Dockerfiles
* the CLI option --build-arg=compiler="${OPAM_SWITCH}" is now useless (it had been introduced to be able to compile Coq versions < 8.7, while mathcomp-dev now requires Coq 8.7+) * the "coqorg/base:bare" image now contains the two environment vars COMPILER and COMPILER_EDGE => clear COMPILER="" in mathcomp-dev's Dockerfile multi-stage build.
Diffstat (limited to 'Dockerfile.make')
-rw-r--r--Dockerfile.make14
1 files changed, 4 insertions, 10 deletions
diff --git a/Dockerfile.make b/Dockerfile.make
index bb8b653..8f305ae 100644
--- a/Dockerfile.make
+++ b/Dockerfile.make
@@ -5,18 +5,12 @@ WORKDIR /home/coq/mathcomp
COPY . .
-ARG compiler="base"
-# other possible value: "edge"
-
RUN ["/bin/bash", "--login", "-c", "set -x \
- && declare -A switch_table \
- && switch_table=( [\"base\"]=\"${COMPILER}\" [\"edge\"]=\"${COMPILER_EDGE}\" ) \
- && opam_switch=\"${switch_table[${compiler}]}\" \
- && [ -n \"opam_switch\" ] \
- && opam switch set ${opam_switch} \
+ && [ -n \"${COMPILER_EDGE}\" ] \
+ && opam switch set \"${COMPILER_EDGE}\" \
&& eval $(opam env) \
- && unset \"switch_table[${compiler}]\" \
- && for sw in \"${switch_table[@]}\"; do [ -n \"$sw\" ] && opam switch remove -y \"${sw}\"; done \
+ && [ -n \"${COMPILER}\" ] \
+ && opam switch remove -y \"${COMPILER}\" \
&& opam repository add --all-switches --set-default coq-extra-dev https://coq.inria.fr/opam/extra-dev \
&& opam repository add --all-switches --set-default coq-core-dev https://coq.inria.fr/opam/core-dev \
&& opam update -y \