3 ms·
That happens as well on Debian if there are no wheels for your packages. It happens quite often when Python versions change. I just run a multistage build wher
by aeyes 7y ago
That happens as well on Debian if there are no wheels for your packages. It happens quite often when Python versions change.
I just run a multistage build where I first install all the packages, building wheels were necessary. Then I copy them to a new clean image from the first container. Another benefit is that I don't need to have a compiler installed in my final image. The Dockerfile is much cleaner than having one huge RUN which installs and then uninstalls build dependencies.
- verst 7y agoThis. The author should use a multi-stage build where one stage is used for building the missing wheels. Those should then be copied over to the final stage. No need to install any build tools in the final Alpine (or Debian) image. The Alpine image will definitely be much smaller.