Closed alexdutton closed 4 years ago
And on cue, CentOS 8.2-2004 was released yesterday, which includes Python 3.8. They've not released a Docker image for it yet though.
Here's the size comparisons:
[alex@misha ~]$ docker image ls invenio-buster
REPOSITORY TAG IMAGE ID CREATED SIZE
invenio-buster latest 6181b8363222 24 hours ago 890MB
[alex@misha ~]$ docker image ls inveniosoftware/centos7-python
REPOSITORY TAG IMAGE ID CREATED SIZE
inveniosoftware/centos7-python 3.6 4616946dd385 8 days ago 1.42GB
Though I assume that the additional development tools in the centos7-based image account for a lot of the difference.
@alexsdutton thanks! Its almost double weight on CentOS 😅 Nice work!
CentOS 8.2-2004 was uploaded to Docker Hub yesterday, so I'll have a look at that too.
I'm going to close this as it's been superseded by Python 3.7 on CentOS 8.2-2004.
Spurred on by a conversation on Discord, this is a test of moving to the official Python docker images, as they provide for Python 3.7 and 3.8, which isn't yet available from any CentOS release. I've chosen the Debian buster image over the alpine one because of https://pythonspeed.com/articles/alpine-docker-python/, at @egabancho's suggestion.
I've tested this by creating a new InvenioRDM instance using
invenio-cli
, changing the base image for theDockerfile
, updating thepython_requires
value in thePipfile
and thenpipenv lock
ing. The resulting image builds successfully and shows the homepage expected.Summary of changes:
Python 3.7 is the default for the base image, so we no longer need to install it and make it the default using alternatives
Move from the .rpm node package to the .deb one
Add --no-cache-dir to pip command, for a smaller image and because the cache has no benefit
Remove some -devel packages. Debian doesn't seem to have equivalent -dev packages
Add libcairo, as it's needed by cairocffi, via invenio-formatter
Add locales, as its files are needed by localedef
Remove the yum 'Development Tools' group, as there's no obvious equivalent in Debian
Edit: Closes https://github.com/inveniosoftware/docker-invenio/issues/10