<div dir="ltr"><div>This is fantastic Julian! The only thing I can contribute that hasn't already been said by you or David is to suggest taking a look at MiniDeb as a base image ( <a href="https://github.com/bitnami/minideb">https://github.com/bitnami/minideb</a> ). I would also suggest using <a href="http://quay.io">quay.io</a> to build and host your Docker images, as it has built in security scanning. I prefer minimal install images not for size reduction ( though it is nice ), but for the smaller attack surface they provide. Fewer things installed means fewer exploits available!</div><div><br></div><div>Kyle</div><div><br></div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><div style="font-size:small">---<br></div></div><div><a href="http://www.kylehall.info" target="_blank">http://www.kylehall.info</a><br>ByWater Solutions ( <a href="http://bywatersolutions.com" target="_blank">http://bywatersolutions.com</a> )<br>Meadville Public Library ( <a href="http://www.meadvillelibrary.org" target="_blank">http://www.meadvillelibrary.org</a> )<br>Crawford County Federated Library System ( <a href="http://www.ccfls.org" target="_blank">http://www.ccfls.org</a> )<br></div></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 17, 2020 at 12:59 PM Julian Maurice <<a href="mailto:julian.maurice@biblibre.com">julian.maurice@biblibre.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all,<br>
<br>
I've been playing with docker lately, and I tried to build a minimal <br>
docker image for Koha. Here are the results.<br>
<br>
My goals were:<br>
* Install only required "things" to get Koha up and running, and nothing <br>
else (no testing or dev tools),<br>
* No external dependencies except CPAN<br>
* Follow Docker best practices as much as possible<br>
<br>
The resulting images are here:<br>
   <a href="https://hub.docker.com/repository/docker/julianmaurice/koha" rel="noreferrer" target="_blank">https://hub.docker.com/repository/docker/julianmaurice/koha</a><br>
<br>
and the Dockerfiles are here:<br>
   <a href="https://github.com/jajm/koha-docker" rel="noreferrer" target="_blank">https://github.com/jajm/koha-docker</a><br>
<br>
A few things worth mentioning:<br>
<br>
* I tried to build the smallest image possible by using alpine or perl <br>
slim images at first but it was not that great, because the perl version <br>
shipped with those images is missing some libs, which cause <br>
MARC::Charset to build a database of several hundreds MBs (which is only <br>
5MBs with a standard perl version). So I chose a more standard image <br>
(debian:buster) as base.<br>
<br>
* Koha doesn't work well when running with a perl version different than <br>
the system perl installed in /usr/bin/perl. For example, the <br>
updatedatabase doesn't work when called from the web installer. This is <br>
because Perl scripts are called directly as executable files, and <br>
shebangs contain '/usr/bin/perl'. Same problem from <br>
misc/translator/translate which calls <a href="http://tmpl_process3.pl" rel="noreferrer" target="_blank">tmpl_process3.pl</a>.<br>
<br>
* I tried to make the Koha installation as self-contained as possible. <br>
Almost everything is installed as a non-root user in /home/koha, <br>
including Perl dependencies.<br>
<br>
* It doesn't need a reverse proxy such as apache or nginx. The necessary <br>
URL rewriting is handled in PSGI file. The container expose two ports, <br>
one for intranet, the other one for OPAC.<br>
<br>
* Each Perl dependency is installed in its latest version, so expect <br>
things to break. I can only confirm that the webinstaller, basic <br>
cataloguing and search/indexation work. I did not test anything else.<br>
<br>
* There are docker-compose.yml files in the github repository to get <br>
Koha running quickly with mariadb, memcached and elasticsearch.<br>
<br>
* Zebra is not installed<br>
<br>
* Images weigh ~1.15GB uncompressed (koha sources included)<br>
<br>
If you made it this far, thanks for reading :)<br>
And if you want to use these docker images, you should start by reading <br>
<a href="https://github.com/jajm/koha-docker/blob/master/README.md" rel="noreferrer" target="_blank">https://github.com/jajm/koha-docker/blob/master/README.md</a><br>
<br>
-- <br>
Julian Maurice<br>
BibLibre<br>
_______________________________________________<br>
Koha-devel mailing list<br>
<a href="mailto:Koha-devel@lists.koha-community.org" target="_blank">Koha-devel@lists.koha-community.org</a><br>
<a href="https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" rel="noreferrer" target="_blank">https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>
website : <a href="http://www.koha-community.org/" rel="noreferrer" target="_blank">http://www.koha-community.org/</a><br>
git : <a href="http://git.koha-community.org/" rel="noreferrer" target="_blank">http://git.koha-community.org/</a><br>
bugs : <a href="http://bugs.koha-community.org/" rel="noreferrer" target="_blank">http://bugs.koha-community.org/</a><br>
</blockquote></div>