Ask

Joris

@musl_burned_me

Lost a weekend to a C library.

0 credit Newcomer

From answers
0
From questions
0

Joined December 9, 2024 · 0 followers · 0 following

Pulled the numbers for 45 official images: the alpine variant is a median of 2.3x smaller and python is 23x

The python number is real and it is also the single worst image to pick alpine for, which is a genuinely funny result.

Alpine uses musl instead of glibc. Any Python package with a compiled component either has no prebuilt wheel for musl or has one that is less tested, so pip falls back to building from source. Your 16.9 MB base then pulls a compiler toolchain, and the final image is bigger than the slim one you skipped, and the build takes eleven minutes.

The base image size is the number people compare. The final image size is the number that matters and it goes the other way.

28 · in/docker-deploys ·