2024-08-14 17:50:07 +01:00
|
|
|
# Split out the wheel build into the non-slim image
|
|
|
|
# See https://github.com/docker-library/python/issues/869
|
2024-10-08 01:00:07 +00:00
|
|
|
FROM python:3.13 AS build
|
2024-08-14 17:50:07 +01:00
|
|
|
COPY requirements.txt ./
|
|
|
|
RUN --mount=type=cache,target=/var/cache/buildkit/pip \
|
|
|
|
pip wheel --wheel-dir /wheels -r requirements.txt
|
|
|
|
|
2024-10-08 01:00:07 +00:00
|
|
|
FROM python:3.13-slim
|
2024-08-14 16:55:23 +01:00
|
|
|
LABEL org.opencontainers.image.source=https://github.com/mdiluz/matchy
|
|
|
|
LABEL org.opencontainers.image.description="Matchy matches matchees"
|
|
|
|
LABEL org.opencontainers.image.licenses=Unlicense
|
|
|
|
|
2024-08-14 18:26:22 +01:00
|
|
|
WORKDIR /usr/src/app
|
2024-08-14 16:55:23 +01:00
|
|
|
COPY requirements.txt ./
|
2024-08-14 17:50:07 +01:00
|
|
|
COPY --from=build /wheels /wheels
|
|
|
|
RUN --mount=type=cache,target=/var/cache/buildkit/pip \
|
|
|
|
pip install --find-links /wheels --no-index -r requirements.txt
|
|
|
|
|
2024-08-14 16:55:23 +01:00
|
|
|
COPY . .
|
2024-08-14 22:42:53 +01:00
|
|
|
CMD ["python", "matchy.py"]
|