Skip to content
RED SAGSkills
medium10 pts · first answer countsdocker

Purpose of a multi-stage build

What is the main benefit of this Dockerfile pattern?

FROM python:3.12 AS build
COPY requirements.txt .
RUN pip wheel --wheel-dir /wheels -r requirements.txt

FROM python:3.12-slim
COPY --from=build /wheels /wheels
RUN pip install --no-index /wheels/*
COPY app/ /app
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions