Skip to content
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

Closed
wants to merge 6 commits into from
Closed

Bumbed version to 7.7.1. Also #8

wants to merge 6 commits into from

Conversation

JanWielemaker
Copy link
Member

  • 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.

Jan Wielemaker added 2 commits October 10, 2017 17:03
  - 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 && \
Copy link
Contributor

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?

Copy link
Member Author

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.

libmariadbclient18 && \
rm -rf /var/lib/apt/lists/*

ENV SWIPL_VER 7.7.1
Copy link
Contributor

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.

Copy link
Member Author

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?

Copy link
Contributor

@ninjarobot ninjarobot left a 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.

@JanWielemaker
Copy link
Member Author

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!

@JanWielemaker
Copy link
Member Author

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 swipl and a swipl:xl or something similar. I've reorganised the apt dependencies a little to hint what belongs to what so you can easily split them.

@ninjarobot
Copy link
Contributor

Jan - thank you, this looks great, the resulting image doesn't have any of the layers from the build image definition.

One strange thing I see, the ENV values which are in the build image seemed to make their way into the final image, so if I run set on a container from the final image, I see environment variables like SPACE_SHA1=cd6fefa63317a7a6effb61a1c5aee634ebe2ca05.

@tianon or @yosifkit - should the ENV from a builder image make their way into the final image or is this a bug? Also, any other concerns with this Dockerfile? Is everything acceptable with the pulls from a few other GitHub repos?

@ninjarobot
Copy link
Contributor

REF: moby/moby#35174

@tianon
Copy link
Contributor

tianon commented Oct 11, 2017

Unfortunately, the official-images infrastructure cannot support multi-stage builds; see docker-library/official-images#3383.

@JanWielemaker JanWielemaker deleted the v7.7.1 branch October 27, 2020 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants