Skip to content

Instantly share code, notes, and snippets.

@koo5
Last active November 1, 2020 17:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save koo5/3682abb9098519fb58b8992a95a8b364 to your computer and use it in GitHub Desktop.
Save koo5/3682abb9098519fb58b8992a95a8b364 to your computer and use it in GitHub Desktop.
swipl-devel docker
FROM ubuntu:18.04
# install and set up locale stuff
env LOC en_AU.UTF-8
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y locales language-pack-en \
&& sed -i -e 's/# $LOC UTF-8/$LOC UTF-8/' /etc/locale.gen \
&& dpkg-reconfigure --frontend=noninteractive locales \
&& update-locale LANG=$LOC
ENV LANG $LOC
ENV LC_ALL $LOC
# install dependencies and clean up
RUN apt-get install -y \
git \
build-essential cmake ninja-build pkg-config \
ncurses-dev libreadline-dev libedit-dev \
libunwind-dev \
libgmp-dev \
libssl-dev \
unixodbc-dev \
zlib1g-dev libarchive-dev \
libossp-uuid-dev \
libxext-dev libice-dev libjpeg-dev libxinerama-dev libxft-dev \
libxpm-dev libxt-dev \
libdb-dev \
libpcre3-dev \
libyaml-dev \
&& rm -rf /var/lib/apt/lists/*
# build and install swipl
RUN mkdir /app
WORKDIR /app
RUN git clone --branch V8.1.15 https://github.com/SWI-Prolog/swipl-devel.git
WORKDIR swipl-devel
RUN git submodule update --init
RUN mkdir build
WORKDIR build
RUN cmake -G Ninja ..
RUN ninja
RUN ctest -j 8
RUN ninja install
# for gtrace:
#VOLUME /tmp/.X11-unix
#COPY swipl/Defaults /root/.config/swi-prolog/xpce/Defaults
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment