-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
49 lines (48 loc) · 1.79 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
FROM debian:bullseye
LABEL maintainer "Dave Curylo <[email protected]>, Michael Hendricks <[email protected]>"
RUN apt-get update && \
apt-get install -y --no-install-recommends \
libarchive13 \
libtcmalloc-minimal4 \
libgmp10 \
libossp-uuid16 \
libssl1.1 \
ca-certificates \
libpcre3 \
libpcre2-8-0 \
libedit2 \
libncurses6 && \
rm -rf /var/lib/apt/lists/*
ENV LANG C.UTF-8
#COPY patches /tmp/patches
RUN set -eux; \
SWIPL_VER=9.0.4; \
SWIPL_CHECKSUM=feb2815a51d34fa81cb34e8149830405935a7e1d1c1950461239750baa8b49f0; \
BUILD_DEPS='make cmake gcc g++ ninja-build wget git autoconf libarchive-dev libgmp-dev libossp-uuid-dev libpcre3-dev libreadline-dev libedit-dev libssl-dev zlib1g-dev libgoogle-perftools-dev libpcre2-dev'; \
apt-get update; apt-get install -y --no-install-recommends $BUILD_DEPS; rm -rf /var/lib/apt/lists/*; \
mkdir /tmp/src; \
cd /tmp/src; \
wget http://www.swi-prolog.org/download/stable/src/swipl-$SWIPL_VER.tar.gz; \
echo "$SWIPL_CHECKSUM swipl-$SWIPL_VER.tar.gz" >> swipl-$SWIPL_VER.tar.gz-CHECKSUM; \
sha256sum -c swipl-$SWIPL_VER.tar.gz-CHECKSUM; \
tar -xzf swipl-$SWIPL_VER.tar.gz; \
cd swipl-$SWIPL_VER; \
# for PATCH in /tmp/patches/*; do git apply $PATCH; done; \
mkdir build; \
cd build; \
cmake -DCMAKE_BUILD_TYPE=PGO \
-DSWIPL_PACKAGES_X=OFF \
-DSWIPL_PACKAGES_JAVA=OFF \
-DCMAKE_INSTALL_PREFIX=/usr \
-DINSTALL_DOCUMENTATION=OFF \
-DSWIPL_PACKAGES_ODBC=OFF \
-G Ninja \
..; \
ninja; \
ninja install; \
rm -rf /tmp/src; rm -rf /tmp/patches; \
mkdir -p /usr/lib/swipl/pack; \
cd /usr/lib/swipl/pack; \
dpkgArch="$(dpkg --print-architecture)"; \
apt-get purge -y --auto-remove $BUILD_DEPS;
CMD ["swipl"]