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
Standard PyPI wheels don’t work on Alpine
Alpine Linux can cause unexpected runtime bugs
Alpine uses a different libc: musl, compared to glibc. And the .whl format is not entirely compatible with musl. And some packages for pip are only offered in .whl format docker-library/docs#904 pypa/manylinux#37 pypa/pip#3969
The manylinux1 tags allow projects to distribute wheels that are automatically installed (and work!) on the vast majority of desktop and server Linux distributions.
$ docker pull python:3.83.8: Pulling from library/pythonDigest: sha256:2c1045587e4452d49544c6dce92efe21c3b4b33864cfb56fdee66a2c8585c769Status: Image is up to date for python:3.8docker.io/library/python:3.8
$ docker pull python:3.8-slim3.8-slim: Pulling from library/pythonDigest: sha256:a9e6f501d8330b2b00d87f3ff17cc0ef8c1c5031f8dfe428983d1c6fe7080338Status: Image is up to date for python:3.8-slimdocker.io/library/python:3.8-slim
$ docker pull python:3.8-alpine3.8-alpine: Pulling from library/pythonDigest: sha256:bd7f0719874c7de4ca47418de143ab4de79731dc0b01fdcf2425b8a32f4823ceStatus: Image is up to date for python:3.8-alpinedocker.io/library/python:3.8-alpine
$ docker images python:3.8REPOSITORY TAG IMAGE ID CREATED SIZEpython 3.8 79cc46abd78d 7 days ago 882MB
$ docker images python:3.8-slimREPOSITORY TAG IMAGE ID CREATED SIZEpython 3.8-slim 38cd21c9e1a8 7 days ago 113MB
$ docker images python:3.8-alpineREPOSITORY TAG IMAGE ID CREATED SIZEpython 3.8-alpine 44fceb565b2a 7 days ago 42.7MB
Activity
wglambert commentedon Aug 19, 2020
Alpine uses a different
libc:musl, compared toglibc. And the.whlformat is not entirely compatible with musl. And some packages forpipare only offered in.whlformatdocker-library/docs#904
pypa/manylinux#37
pypa/pip#3969
https://github.com/pypa/manylinux
In the docs it's mentioned that Alpine may behave differently from other Linux variants https://github.com/docker-library/docs/tree/master/python#pythonversion-alpine
tianon commentedon Aug 19, 2020
The size difference is also improved by #508: