Refactor to use pip to install wheels
MODIFY
Dockerfile
Dockerfile
# syntax = docker/dockerfile:1.3-labs
FROM python:3.11-alpine3.16 AS base
-
WORKDIR /app
# Create minimal layer with extra tools
@@ -29,8 +28,9 @@ RUN \
FROM base AS build
RUN apk add git
RUN pip install pipenv
-COPY Pipfile* ./
-RUN pipenv install --deploy
+RUN \
+ --mount=type=bind,from=wheels,source=/wheels,target=/wheels \
+ pipenv run pip install /wheels/*.whl
FROM base AS compile
ARG APP_VERSION=$APP_VERSION

Refactor to use pip to install wheels