aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile.make
diff options
context:
space:
mode:
authorCyril Cohen2020-03-12 11:52:22 +0100
committerGitHub2020-03-12 11:52:22 +0100
commitbf4ddf1894c6ac63dffae2bdad8f8c5300ba0954 (patch)
treef54adba22ff99ab008ad18ed089ae6946670260d /Dockerfile.make
parent7d04173b52cf02717b8f8e8c13bb7c3521de7e89 (diff)
parent3ae871fff2165c27b8bb389f1829766a4d6f00d9 (diff)
Merge pull request #455 from erikmd/bump-opam
[ci] Simplify {Dockerfile,Dockerfile.make} & Restore the "opam clean -c" option
Diffstat (limited to 'Dockerfile.make')
-rw-r--r--Dockerfile.make16
1 files changed, 5 insertions, 11 deletions
diff --git a/Dockerfile.make b/Dockerfile.make
index 1a1dfc2..8f305ae 100644
--- a/Dockerfile.make
+++ b/Dockerfile.make
@@ -5,23 +5,17 @@ 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 \
&& opam config list && opam repo list && opam list && coqc --version \
- && opam clean -a -s --logs \
+ && opam clean -a -c -s --logs \
&& sudo chown -R coq:coq /home/coq/mathcomp \
&& cd mathcomp \
&& make Makefile.coq \