Skip to content

Commit e4f28da

Browse files
committed
Update docker image
Simplify docker files + more provers
1 parent fa96e87 commit e4f28da

File tree

10 files changed

+68
-69
lines changed

10 files changed

+68
-69
lines changed

scripts/docker/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

scripts/docker/base-box/Dockerfile renamed to scripts/docker/Dockerfile.base

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
FROM debian:stable
1+
# syntax = devthefuture/dockerfile-x
22

3-
ARG user=charlie
3+
FROM debian:stable
44

55
MAINTAINER Pierre-Yves Strub <[email protected]>
66

7+
ARG user=charlie
8+
79
ENV DEBIAN_FRONTEND noninteractive
810

911
RUN \
@@ -12,7 +14,7 @@ RUN \
1214
apt-get -q -y install sudo && \
1315
apt-get -q -y clean
1416

15-
COPY --chown=root:root --chmod=0400 sudoers /etc/sudoers.d/
17+
COPY --chown=root:root --chmod=0400 docker-parts/sudoers /etc/sudoers.d/
1618

1719
RUN \
1820
useradd -ms /bin/bash -d /home/$user -g root -G sudo -u 1001 $user
@@ -26,5 +28,7 @@ WORKDIR /home/$user
2628

2729
ENV OPAMYES=true OPAMVERBOSE=0 OPAMJOBS=4
2830

31+
ARG OCAML_VERSION=5.2.0
32+
2933
RUN \
30-
opam init --disable-sandboxing --compiler=ocaml-base-compiler.5.1.0
34+
opam init --disable-sandboxing --compiler=ocaml-base-compiler.${OCAML_VERSION}
Lines changed: 38 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
FROM ghcr.io/easycrypt/ec-base-box:latest
1+
# syntax = devthefuture/dockerfile-x
22

3-
MAINTAINER Pierre-Yves Strub <[email protected]>
4-
5-
ENV DEBIAN_FRONTEND noninteractive
3+
FROM ./Dockerfile.base as base-build
64

75
RUN \
86
sudo apt-get -q -y install wget curl python3 python3-pip python3-yaml && \
@@ -13,52 +11,64 @@ RUN \
1311
opam install --deps-only --confirm-level=unsafe-yes easycrypt && \
1412
opam clean
1513

14+
COPY --chmod=0755 --chown=1001:0 docker-parts/alt-ergo bin/run-alt-ergo
15+
16+
ENV PATH="/home/charlie/bin:$PATH"
17+
18+
RUN \
19+
version=2.5.4 && \
20+
opam switch create --no-switch alt-ergo-${version} ocaml-system && \
21+
opam pin --switch=alt-ergo-${version} add -n alt-ergo ${version} && \
22+
opam install --switch=alt-ergo-${version} --deps-only --confirm-level=unsafe-yes alt-ergo && \
23+
opam install --switch=alt-ergo-${version} alt-ergo && \
24+
opam clean --switch=alt-ergo-${version} && \
25+
ln -s run-alt-ergo ~/bin/alt-ergo-${version}
26+
27+
RUN \
28+
version=2.4.3 && \
29+
opam switch create --no-switch alt-ergo-${version} ocaml-system && \
30+
opam pin --switch=alt-ergo-${version} add -n alt-ergo ${version} && \
31+
opam install --switch=alt-ergo-${version} --deps-only --confirm-level=unsafe-yes alt-ergo && \
32+
opam install --switch=alt-ergo-${version} alt-ergo && \
33+
opam clean --switch=alt-ergo-${version} && \
34+
ln -s run-alt-ergo ~/bin/alt-ergo-${version}
35+
36+
FROM base-build as main-linux-amd64
37+
1638
RUN \
1739
version=1.8 && \
1840
wget -O cvc4 https://github.com/CVC4/CVC4-archived/releases/download/${version}/cvc4-${version}-x86_64-linux-opt && \
1941
sudo install -m 0755 cvc4 /usr/local/bin/cvc4-${version} && \
2042
rm -f cvc4
2143

2244
RUN \
23-
version=1.0.6 && \
45+
version=1.0.9 && \
2446
wget -O cvc5 https://github.com/cvc5/cvc5/releases/download/cvc5-${version}/cvc5-Linux && \
2547
sudo install -m 0755 cvc5 /usr/local/bin/cvc5-${version} && \
2648
rm -f cvc5
2749

2850
RUN \
29-
version=4.12.2 && glibc=2.35 && \
51+
version=4.13.0 && glibc=2.35 && \
3052
wget -O z3.zip https://github.com/Z3Prover/z3/releases/download/z3-${version}/z3-${version}-x64-glibc-${glibc}.zip && \
3153
unzip -j z3.zip z3-${version}-x64-glibc-${glibc}/bin/z3 && \
3254
sudo install -m 0755 z3 /usr/local/bin/z3-${version} && \
3355
rm -f z3 z3.zip
56+
3457
RUN \
35-
version=4.8.10 && glibc=ubuntu-18.04 && \
36-
wget -O z3.zip https://github.com/Z3Prover/z3/releases/download/z3-${version}/z3-${version}-x64-${glibc}.zip && \
37-
unzip -j z3.zip z3-${version}-x64-${glibc}/bin/z3 && \
58+
version=4.12.6 && glibc=2.35 && \
59+
wget -O z3.zip https://github.com/Z3Prover/z3/releases/download/z3-${version}/z3-${version}-x64-glibc-${glibc}.zip && \
60+
unzip -j z3.zip z3-${version}-x64-glibc-${glibc}/bin/z3 && \
3861
sudo install -m 0755 z3 /usr/local/bin/z3-${version} && \
3962
rm -f z3 z3.zip
4063

41-
COPY --chmod=0755 --chown=1001:0 alt-ergo bin/run-alt-ergo
42-
43-
RUN \
44-
version=2.5.2 && \
45-
opam switch create --no-switch alt-ergo-${version} ocaml-system && \
46-
opam pin --switch=alt-ergo-${version} add -n alt-ergo ${version} && \
47-
opam install --switch=alt-ergo-${version} --deps-only --confirm-level=unsafe-yes alt-ergo && \
48-
opam install --switch=alt-ergo-${version} alt-ergo && \
49-
opam clean --switch=alt-ergo-${version} && \
50-
ln -s run-alt-ergo ~/bin/alt-ergo-${version}
51-
5264
RUN \
53-
version=2.4.2 && \
54-
opam switch create --no-switch alt-ergo-${version} ocaml-system && \
55-
opam pin --switch=alt-ergo-${version} add -n alt-ergo ${version} && \
56-
opam install --switch=alt-ergo-${version} --deps-only --confirm-level=unsafe-yes alt-ergo && \
57-
opam install --switch=alt-ergo-${version} alt-ergo && \
58-
opam clean --switch=alt-ergo-${version} && \
59-
ln -s run-alt-ergo ~/bin/alt-ergo-${version}
65+
version=4.8.17 && glibc=2.31 && \
66+
wget -O z3.zip https://github.com/Z3Prover/z3/releases/download/z3-${version}/z3-${version}-x64-glibc-${glibc}.zip && \
67+
unzip -j z3.zip z3-${version}-x64-glibc-${glibc}/bin/z3 && \
68+
sudo install -m 0755 z3 /usr/local/bin/z3-${version} && \
69+
rm -f z3 z3.zip
6070

61-
ENV PATH="/home/charlie/bin:$PATH"
71+
FROM main-linux-amd64
6272

6373
RUN \
6474
opam exec -- why3 config detect

scripts/docker/Dockerfile.test

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# syntax = devthefuture/dockerfile-x
2+
3+
FROM ./Dockerfile.build
4+
5+
ARG EC_VERSION=main
6+
7+
RUN \
8+
opam pin --dev-repo \
9+
add -n easycrypt https://github.com/EasyCrypt/easycrypt.git#${EC_VERSION} && \
10+
opam install -v easycrypt && \
11+
rm -rf .opam/packages.dev/*

scripts/docker/Makefile

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,18 @@
1-
# -*- Makefile -*-
1+
#! -*- Makefile -*-
22

33
# --------------------------------------------------------------------
4-
# docker.com account name
5-
DNAME ?= ghcr.io/easycrypt
6-
BBOX := build-box test-box
4+
VARIANT ?= build
75

86
# --------------------------------------------------------------------
9-
.PHONY: all __force__
7+
.PHONY: default build publish
108

11-
default:
12-
@echo "Available images: $(BBOX)"
9+
default: build
1310

14-
all:
15-
for i in $(BBOX); do $(MAKE) $$i-build; done
11+
build:
12+
docker build -f Dockerfile.$(VARIANT) \
13+
--platform linux/amd64 \
14+
-t ghcr.io/easycrypt/ec-$(VARIANT)-box \
15+
.
1616

17-
%-test-box-build:
18-
[ -d $*-test-box ] || mkdir $*-test-box
19-
sed -e 's/BRANCH/$*/g' < templates/Dockerfile > $*-test-box/Dockerfile
20-
cd $*-test-box && docker build -t $(DNAME)/ec-$*-test-box .
21-
22-
%-build: __force__
23-
cd $* && docker build --platform linux/amd64 -t $(DNAME)/ec-$* .
24-
25-
%-publish: __force__
26-
cd $* && docker push $(DNAME)/ec-$*:latest
17+
publish:
18+
docker push ghcr.io/easycrypt/ec-$(VARIANT)-box
File renamed without changes.
File renamed without changes.

scripts/docker/templates/Dockerfile

Lines changed: 0 additions & 6 deletions
This file was deleted.

scripts/docker/test-box/Dockerfile

Lines changed: 0 additions & 8 deletions
This file was deleted.

scripts/docker/test-box/hooks/build

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)