-
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
Conversation
JanWielemaker
commented
Oct 10, 2017
- Move constants to docker environment vars
- Disables libdir versions, so we get /swipl/lib/swipl without versions
- Install space from the addon registry. space is not part of the tarball.
- Move constants to docker environment vars - Disables libdir versions, so we get /swipl/lib/swipl without versions - Install space from the addon registry. space is not part of the tarball.
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 comment
The reason will be displayed to describe this comment to others. Learn more.
Would this make sense as an additional image tag, i.e. swipl:7.1.1-space
? It could be based off the 7.1.1 release, but adds space
. We could have another Dockerfile that is little more than FROM swipl
and then RUN
for the space
build. Or should this always be part of the full image?
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'm against a -space
. We have SWI-Prolog's real core, its library that is bundled with the core, its packages that are bundled in the tar archive and can be compiled separately and community packages. None of the boundaries are very hard. Space
went from the 2nd to the 3rd class because it is fairly hard to install in arbitrary environments, causing lots of porting issues while it is not vital. I got feedback from two people telling me that including space was a good idea (they looked at the Dockerfile and saw it included), so I first wanted to make that work.
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:
- Just include them
- Have a
swipl:xl
version.
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.
7.7.1/stretch/Dockerfile
Outdated
libmariadbclient18 && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
ENV SWIPL_VER 7.7.1 |
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?
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.
@JanWielemaker I had just a few comments, as I expect I'll have similar questions from the official image curators.
Its so simple that I did the multi-stage build. The image is now 139 vs 136 Mb, but we have the space package (2.3Mb and the ca-certificates (small)). So, it seems we are ok. It is surely a lot simpler like this! |
…e_client. Total image size is 148Mb.
Dave, I think I've reached a stage in which I like to have this. Including 5 add-ons that are needed in server setups people around me use a lot and often have trouble building. They makes the image grow from 136Mb to 148Mb. Possibly this can be reduced a bit further by deleting some test, demo and documentation files. If you don't like this, I propose you split it into the plain |
Jan - thank you, this looks great, the resulting image doesn't have any of the layers from the One strange thing I see, the @tianon or @yosifkit - should the |
REF: moby/moby#35174 |
Unfortunately, the official-images infrastructure cannot support multi-stage builds; see docker-library/official-images#3383. |