Skip to content

Commit

Permalink
Install Poetry from pinned version
Browse files Browse the repository at this point in the history
This longstanding TODO will at least make sure we have one source of
truth for Poetry versions.

Run a newer version of pip while we're at it.
  • Loading branch information
DavidCain committed Jun 23, 2024
1 parent a4532bd commit 96ae881
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# - Ensure that Celery works as well
# - Run WSGI with an ENTRYPOINT

FROM ubuntu:22.04 as build
FROM ubuntu:22.04 AS build

WORKDIR /app/

Expand Down Expand Up @@ -40,10 +40,10 @@ ENV LANGUAGE=en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LC_ALL=en_US.UTF-8

RUN pip3 install --upgrade pip==22.0.4
RUN pip3 install --upgrade pip==24.1

# TODO: Check asdf's .tool-versions
RUN pip install poetry==1.7.1
COPY .tool-versions .
RUN pip install poetry==$(awk '/poetry/{printf $2}' .tool-versions)
COPY poetry.lock .

# Instruct poetry to create a venv in `.venv`, then auto-add it to path
Expand Down Expand Up @@ -72,7 +72,7 @@ RUN WS_DJANGO_TEST=1 ./manage.py collectstatic

# ------------------------------------------------------------------------

FROM build as installer
FROM build AS installer

# Remove dev dependencies (smaller venv, no dev deps in prod)
RUN poetry install --no-root --sync --only=prod
Expand Down

0 comments on commit 96ae881

Please sign in to comment.