-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
81 lines (71 loc) · 2.75 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
FROM debian:stable-slim
LABEL org.opencontainers.image.source="https://github.com/mister-walter/acl2-docker"
# This will have RW permission for the ACL2 directory.
RUN groupadd acl2 && usermod -aG acl2 root && exit
# Based on https://github.com/wshito/roswell-base
# openssl-dev is needed for Quicklisp
# perl is needed for ACL2's certification scripts
# wget is needed for downloading some files while building the docker image
# The rest are needed for Roswell
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
gcc \
git \
automake \
autoconf \
make \
libcurl4-openssl-dev \
ca-certificates \
libssl-dev \
wget \
perl \
zlib1g-dev \
libzstd-dev \
curl \
unzip \
sbcl \
&& rm -rf /var/lib/apt/lists/* # remove cached apt files
RUN mkdir /root/sbcl \
&& cd /root/sbcl \
&& wget "http://prdownloads.sourceforge.net/sbcl/sbcl-2.4.9-source.tar.bz2?download" -O sbcl.tar.bz2 -q \
&& echo "9970e4ebc5d6943dc64d7ca1f52d9b5cd9fc94cef94d233213d78ec75f3605e2 sbcl.tar.bz2" > sbcl.tar.bz2.sha256 \
&& sha256sum -c sbcl.tar.bz2.sha256 \
&& rm sbcl.tar.bz2.sha256 \
&& tar -xjf sbcl.tar.bz2 \
&& rm sbcl.tar.bz2 \
&& cd sbcl-* \
&& sh make.sh --without-immobile-space --without-immobile-code --without-compact-instance-header --fancy --dynamic-space-size=4Gb \
&& apt-get remove -y sbcl \
&& sh install.sh \
&& cd /root \
&& rm -R /root/sbcl
ARG ACL2_COMMIT=0
ENV ACL2_SNAPSHOT_INFO="Git commit hash: ${ACL2_COMMIT}"
ARG ACL2_BUILD_OPTS=""
ARG ACL2_CERTIFY_OPTS="-j 4"
ARG ACL2_CERTIFY_TARGETS="basic"
ENV CERT_PL_RM_OUTFILES="1"
RUN wget "https://api.github.com/repos/acl2/acl2/zipball/${ACL2_COMMIT}" -O /tmp/acl2.zip -q \
&& unzip -qq /tmp/acl2.zip -d /root/acl2_extract \
&& rm /tmp/acl2.zip \
&& mv /root/acl2_extract/$(ls /root/acl2_extract) /root/acl2 \
&& rmdir /root/acl2_extract \
&& cd /root/acl2 \
&& make LISP="sbcl" $ACL2_BUILD_OPTS \
&& cd books \
&& make $ACL2_CERTIFY_TARGETS ACL2=/root/acl2/saved_acl2 $ACL2_CERTIFY_OPTS \
&& chmod go+rx /root \
&& chown -R :acl2 /root/acl2 \
&& chmod -R g+rwx /root/acl2 \
&& chmod g+s /root/acl2 \
&& find /root/acl2 -type d -print0 | xargs -0 chmod g+s
RUN mkdir -p /opt/acl2/bin \
&& ln -s /root/acl2/saved_acl2 /opt/acl2/bin/acl2 \
&& ln -s /root/acl2/books/build/cert.pl /opt/acl2/bin/cert.pl \
&& ln -s /root/acl2/books/build/clean.pl /opt/acl2/bin/clean.pl \
&& ln -s /root/acl2/books/build/critpath.pl /opt/acl2/bin/critpath.pl
ENV PATH="/opt/acl2/bin:${PATH}"
ENV ACL2_SYSTEM_BOOKS="/root/acl2/books"
ENV ACL2="/root/acl2/saved_acl2"
CMD ["/root/acl2/saved_acl2"]