Improve build time and image size of Python app docker images.
Some notes on slow docker build for Python apps.
Currently, pre-built binary packages (wheel) are built from glibc. But alpine is based on musl and it will be regarded as a different platform for pip. Building from source is unavoidable for some packages until PEP656 is employed or a general platform package is available.
Possibly trying bullseye-slim instead of alpine, it seems like with Python, most of the benefits of alpine are lost. There may be other good base images as well.
Improve build time and image size of Python app docker images.
Some notes on slow docker build for Python apps.
alpine
is based on musl and it will be regarded as a different platform for pip. Building from source is unavoidable for some packages until PEP656 is employed or a general platform package is available.bullseye-slim
instead ofalpine
, it seems like with Python, most of the benefits ofalpine
are lost. There may be other good base images as well.