Skip to content

Commit

Permalink
fix: dockerfile poetry issues
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlougheed committed Aug 15, 2023
1 parent ac060c0 commit 7a576af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ RUN pip install --no-cache-dir "uvicorn[standard]==0.20.0"
WORKDIR /aggregation

COPY pyproject.toml .
COPY poetry.toml .
COPY poetry.lock .

# Install production dependencies
# Without --no-root, we get errors related to the code not being copied in yet.
# But we don't want the code here, otherwise Docker cache doesn't work well.
RUN poetry install --without dev --no-root
RUN poetry config virtualenvs.create false && \
poetry install --without dev --no-root

# Manually copy only what's relevant
# (Don't use .dockerignore, which allows us to have development containers too)
Expand Down
4 changes: 2 additions & 2 deletions dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ RUN pip install --no-cache-dir "uvicorn[standard]==0.20.0"
WORKDIR /aggregation

COPY pyproject.toml .
COPY poetry.toml .
COPY poetry.lock .

# Install production + development dependencies
# Without --no-root, we get errors related to the code not being copied in yet.
# But we don't want the code here, otherwise Docker cache doesn't work well.
RUN poetry install --no-root
RUN poetry config virtualenvs.create false && \
poetry install --no-root

# Don't copy code in, since it gets mounted in with development mode.
# Copy in an entrypoint + runner script so we have somewhere to start.
Expand Down

0 comments on commit 7a576af

Please sign in to comment.