Smaller Python Docker Images with Build Mounts
If you want small Docker images and fast builds, you're likely already using Docker's multi-stage builds . For Python applications, this often means one stage to download and compile any wheels and another stage to install them and add your application source code. For example: FROM python:3.10 AS build COPY requirements.txt . RUN pip wheel -r requirements.txt \ --wheel-dir /whl \…