Spaces:
Build error
Build error
Update & Renamed Dockerfile
Browse files- DOCKERFILE +5 -4
DOCKERFILE
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
FROM python:3.11.4-slim-bullseye
|
2 |
|
3 |
# Set up a new user named "user" with user ID 1000
|
@@ -9,7 +10,7 @@ USER user
|
|
9 |
ENV HOME=/home/user \
|
10 |
PATH=/home/user/.local/bin:$PATH
|
11 |
|
12 |
-
WORKDIR $HOME/
|
13 |
|
14 |
# Install poetry
|
15 |
RUN pip install poetry
|
@@ -19,13 +20,13 @@ ENV POETRY_NO_INTERACTION=1 \
|
|
19 |
POETRY_VIRTUALENVS_CREATE=1 \
|
20 |
POETRY_CACHE_DIR=/tmp/poetry_cache
|
21 |
|
22 |
-
COPY --chown=user ./backend/pyproject.toml ./backend/poetry.lock $HOME/
|
23 |
-
COPY --chown=user ./backend /
|
24 |
|
25 |
RUN poetry install --without dev && \
|
26 |
rm -rf /tmp/poetry_cache
|
27 |
|
28 |
-
COPY --chown=user ./backend $HOME/
|
29 |
|
30 |
# Change to the package directory
|
31 |
WORKDIR $HOME/backend/backend
|
|
|
1 |
+
# Use the official Python slim image
|
2 |
FROM python:3.11.4-slim-bullseye
|
3 |
|
4 |
# Set up a new user named "user" with user ID 1000
|
|
|
10 |
ENV HOME=/home/user \
|
11 |
PATH=/home/user/.local/bin:$PATH
|
12 |
|
13 |
+
WORKDIR $HOME/app
|
14 |
|
15 |
# Install poetry
|
16 |
RUN pip install poetry
|
|
|
20 |
POETRY_VIRTUALENVS_CREATE=1 \
|
21 |
POETRY_CACHE_DIR=/tmp/poetry_cache
|
22 |
|
23 |
+
COPY --chown=user ./backend/pyproject.toml ./backend/poetry.lock $HOME/app/
|
24 |
+
COPY --chown=user ./backend $HOME/app
|
25 |
|
26 |
RUN poetry install --without dev && \
|
27 |
rm -rf /tmp/poetry_cache
|
28 |
|
29 |
+
COPY --chown=user ./backend $HOME/app
|
30 |
|
31 |
# Change to the package directory
|
32 |
WORKDIR $HOME/backend/backend
|