-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bumbed version to 7.7.1. Also #8
Changes from 2 commits
8d0a14f
a053597
f89d997
bb5d8c7
086f091
c8f4e67
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
FROM debian:stretch-slim | ||
LABEL maintainer "Dave Curylo <[email protected]>, Michael Hendricks <[email protected]>" | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
libarchive13 \ | ||
libgmp10 \ | ||
libossp-uuid16 \ | ||
libssl1.1 \ | ||
ca-certificates \ | ||
libdb5.3 \ | ||
libpcre3 \ | ||
libedit2 \ | ||
libgeos-c1v5 \ | ||
libspatialindex4v5 \ | ||
unixodbc \ | ||
odbc-postgresql \ | ||
tdsodbc \ | ||
libmariadbclient18 && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
ENV SWIPL_VER 7.7.1 | ||
ENV SWIPL_CHECKSUM fda2c8b6b606ff199ea8a6f019008aa8272b7c349cb9312ccd5944153509503a | ||
ENV BUILD_DEPS make gcc g++ wget libarchive-dev libgmp-dev libossp-uuid-dev libpcre3-dev \ | ||
libreadline-dev libedit-dev libssl-dev zlib1g-dev libdb-dev libgeos++-dev \ | ||
libspatialindex-dev unixodbc-dev git autoconf | ||
|
||
ENV SPACE_SHA1 cd6fefa63317a7a6effb61a1c5aee634ebe2ca05 | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends ${BUILD_DEPS} && \ | ||
mkdir /tmp/src && \ | ||
cd /tmp/src && \ | ||
wget http://www.swi-prolog.org/download/devel/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} && \ | ||
cp build.templ build && \ | ||
sed -i '/PREFIX=$HOME/c\PREFIX=/swipl' build && \ | ||
sed -i '/# export DISABLE_PKGS/c\export DISABLE_PKGS="jpl xpce"' build && \ | ||
sed -i 's/# *\(.*--disable-libdirversion\)/\1/' build && \ | ||
chmod u+x build && ./build && \ | ||
rm -r /tmp/src && \ | ||
cd /usr/bin && ln -s /swipl/bin/swipl swipl && \ | ||
mkdir /swipl/lib/swipl/pack && \ | ||
cd /swipl/lib/swipl/pack && \ | ||
git clone https://github.com/JanWielemaker/space.git && \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would this make sense as an additional image tag, i.e. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm against a Supporting space in the docker image doesn't change much of its size, while in the controlled Debian stretch environment we can get it installed fairly easily. The same goes for a couple of other add-ons, I think some 3 or 4. They add seconds to the build time and altogether probably a couple of Mb to the image size. Including them will make the image read-to-use for a significantly larger class of server tasks without having to setup the build essentials and add them to your own image. I think there are two options:
Considering simplicity for the users I'm in favour of (1). Note that we are only interested in mixed C/Prolog add-ons. Pure Prolog ones are installed very quickly. In particular when we have a layered Dockerfile the thing should be quite manageable. I'll spend some time adding this stuff today. Getting it to build is hard, while reorganizing is quick. |
||
(cd space && git checkout -q ${SPACE_SHA1}) && \ | ||
(cd space && ln -s configure.ac configure.in) && \ | ||
swipl -g 'pack_rebuild(space)' -t halt && \ | ||
apt-get purge -y --auto-remove ${BUILD_DEPS} && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
ENV LANG C.UTF-8 | ||
CMD ["swipl"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was avoiding these, as each directive results in a new image layer, albeit a small one. If we switch to a multi-stage build, that's largely irrelevant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, let us create layers. Do you do this or do you leave it to me?