inveniosoftware / docker-invenio

Docker base images for Invenio.
https://docker-invenio.readthedocs.io
MIT License
10 stars 34 forks source link

Move to python:3.7-slim-buster for the 3.7 base image #30

Closed alexdutton closed 4 years ago

alexdutton commented 4 years ago

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 the Dockerfile, updating the python_requires value in the Pipfile and then pipenv locking. The resulting image builds successfully and shows the homepage expected.

Summary of changes:

Edit: Closes https://github.com/inveniosoftware/docker-invenio/issues/10

alexdutton commented 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.

alexdutton commented 4 years ago

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.

ppanero commented 4 years ago

@alexsdutton thanks! Its almost double weight on CentOS 😅 Nice work!

alexdutton commented 4 years ago

CentOS 8.2-2004 was uploaded to Docker Hub yesterday, so I'll have a look at that too.

alexdutton commented 4 years ago

I'm going to close this as it's been superseded by Python 3.7 on CentOS 8.2-2004.