Anyone know a 'preferred' way to install wheels into docker containers?
Our approach is to have a wheelbuilder container with all the building dependencies etc in that image, once all wheels are built into a shared volume can be "consumed" by other containers just pointing pip to that folder. It works pretty well for us.
More on reddit.compython - With multi-stage Dockerfile, the pip wheel still needs the dependencies from the base builder - Stack Overflow
How to build a python package with a c extension as a wheel for docker - Stack Overflow
My Python Docker build takes hours to build.
I'm tired of making bloated docker containers that include packages like python-pip and build-essential. I have a project with modules like twisted which compile things during install. What's the sane way for me to first build these modules, then copy them into the docker container? Should I be using wheels? Should I be fully installing modules then copying their paths in? Thanks for your time everyone
Edit: asking more questions :D
Our approach is to have a wheelbuilder container with all the building dependencies etc in that image, once all wheels are built into a shared volume can be "consumed" by other containers just pointing pip to that folder. It works pretty well for us.
We package our wheels in a different build process and upload them to a private repository. I created https://github.com/sherzberg/docker-curdserver just for this use case. Curdling isn't perfect, but it is a really nice wheel repository (as well as non-wheel packages).
We still need pip in the docker container, but the wheels really speeds up the docker build and we also don't need build-essentials.
» pip install docker