Skip to content

Commit

Permalink
Dockerfile: mount the requirements temporarily
Browse files Browse the repository at this point in the history
  • Loading branch information
Actionb committed Aug 6, 2024
1 parent cb5bb88 commit 22d8bba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ RUN ["apk", "update"]
RUN ["apk", "add", "build-base", "apache2-dev", "git"]
RUN ["python3", "-m", "pip", "install", "--upgrade", "pip", "wheel"]

WORKDIR /mizdb
COPY requirements requirements
RUN ["python3", "-m", "pip", "install", "-r", "requirements/base.txt"]
# Temporarily mount the requirements:
# https://docs.docker.com/build/building/best-practices/#add-or-copy
RUN --mount=type=bind,source=requirements,target=/tmp/requirements ["python3", "-m", "pip", "install", "-r", "/tmp/requirements/base.txt"]

FROM python:3.11-alpine AS final

Expand Down

0 comments on commit 22d8bba

Please sign in to comment.