Skip to content

Commit

Permalink
Update & Renamed Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
xKhronoz committed Jan 25, 2024
1 parent 3eefd70 commit 8fe43e9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions DOCKERFILE
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Use the official Python slim image
FROM python:3.11.4-slim-bullseye

# Set up a new user named "user" with user ID 1000
Expand All @@ -9,7 +10,7 @@ USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH

WORKDIR $HOME/backend
WORKDIR $HOME/app

# Install poetry
RUN pip install poetry
Expand All @@ -19,13 +20,13 @@ ENV POETRY_NO_INTERACTION=1 \
POETRY_VIRTUALENVS_CREATE=1 \
POETRY_CACHE_DIR=/tmp/poetry_cache

COPY --chown=user ./backend/pyproject.toml ./backend/poetry.lock $HOME/backend/
COPY --chown=user ./backend /backend
COPY --chown=user ./backend/pyproject.toml ./backend/poetry.lock $HOME/app/
COPY --chown=user ./backend $HOME/app

RUN poetry install --without dev && \
rm -rf /tmp/poetry_cache

COPY --chown=user ./backend $HOME/backend
COPY --chown=user ./backend $HOME/app

# Change to the package directory
WORKDIR $HOME/backend/backend
Expand Down

0 comments on commit 8fe43e9

Please sign in to comment.