You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Clarify that pip wheels are incompatible with alpine-based images #904
The current README.md uses the generic language for other images:
This variant is highly recommended when final image size being as small as possible is desired. The main caveat to note is that it does use musl libc instead of glibc and friends, so certain software might run into issues depending on the depth of their libc requirements. However, most software doesn't have an issue with this, so this variant is usually a very safe choice.
However, for Python specifically, manylinux wheels are incompatible with MUSL, so any docker images that end up pulling native dependencies via pip will likely end up having to build from source (see pypa/manylinux#37). For a popular library like pandas, this is the difference between a 1-minute and a 20-minute build time.
This seems like a significant downside to a Python docker image, and probably should be noted in the documentation.
+1 we are just spinning up some of our Python services into docker and I have since run into this, I attempted to take the route I used for our minimal Ruby containers but soon ran into issues, for now I have moved to 3.5-slim and will eat the larger images but it would be great to seem some compatible manylinux wheels that work with alpine and better clarification in the docs around the caveats.
I think it's time we finally admit this is as fixed as it is probably going to be -- in the meantime, we got https://www.python.org/dev/peps/pep-0656/ which explicitly documents how to support wheels for musl, so the main concern should decrease over time as more libraries add musl wheels.
Activity
stefansedich commentedon Jun 2, 2017
+1 we are just spinning up some of our Python services into docker and I have since run into this, I attempted to take the route I used for our minimal Ruby containers but soon ran into issues, for now I have moved to 3.5-slim and will eat the larger images but it would be great to seem some compatible manylinux wheels that work with alpine and better clarification in the docs around the caveats.
tao12345666333 commentedon Nov 2, 2018
In addition, if you pay attention to performance, please check this page http://moelove.info/docker-python-perf/ to see the performance results.
The code is here https://github.com/tao12345666333/docker-python-perf. And the pipeline run every week.
Dockerfile: use python:slim base image
andelf commentedon Oct 19, 2019
Replace Alpine-based image with a Debian-based image
Replace Alpine-based image with a Debian-based image
Replace Alpine-based image with a Debian-based image
Replace Alpine-based image with a Debian-based image
Replace Alpine-based image with a Debian-based image
Replace Alpine-based image with a Debian-based image
tianon commentedon Nov 5, 2021
This isn't necessarily fixed by #1885, but it's slightly more clear now IMO.
tianon commentedon Feb 18, 2022
I think it's time we finally admit this is as fixed as it is probably going to be -- in the meantime, we got https://www.python.org/dev/peps/pep-0656/ which explicitly documents how to support wheels for musl, so the main concern should decrease over time as more libraries add musl wheels.