Boavizta / boaviztapi

🛠 Giving access to BOAVIZTA reference data and methodologies trough a RESTful API
GNU Affero General Public License v3.0
66 stars 23 forks source link

Reduce the size of the published docker image #137

Closed demeringo closed 1 year ago

demeringo commented 1 year ago

Problem

The docker image produced by the CI seems big (around 350MB for v0.1.x and around 500 MB for v0.2.x).

This is not critical because this image is likely to be cached , and does not need to be downloaded every day, but as we want to lead by example, we should try to reduce it ;-)

Solution

We should try to understand what goes into this image (because the base image python:3.7-slim-buster is expected to be slim in itself). Likely we copy something not needed in the build process...

To investigate, I tend to use dive which provide a view of the layers. https://github.com/wagoodman/dive

Not something to be rushed because we want to make sure we do not break functionality by using a different image.

Alternatives

Additional context or elements