Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +13 -14
Dockerfile
CHANGED
@@ -1,31 +1,30 @@
|
|
1 |
# Use an official Python runtime as a parent image
|
2 |
FROM --platform=amd64 python:3.10
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
# Set environment variables for Poetry
|
5 |
-
ENV POETRY_VERSION=1.4.0 \
|
6 |
-
POETRY_HOME="/opt/poetry" \
|
7 |
-
POETRY_VIRTUALENVS_CREATE=false \
|
8 |
-
POETRY_NO_INTERACTION=1
|
9 |
|
10 |
# Install Poetry
|
11 |
RUN apt-get update && apt-get install -y curl && \
|
12 |
curl -sSL https://install.python-poetry.org | python3 -
|
13 |
|
14 |
# Add Poetry to PATH
|
15 |
-
ENV PATH="$POETRY_HOME/bin:$PATH"
|
16 |
|
17 |
# Install git
|
18 |
RUN apt-get update && apt-get install -y git && apt-get clean
|
19 |
|
20 |
-
|
21 |
-
# Set the working directory in the container
|
22 |
-
RUN useradd -m -u 1000 user
|
23 |
-
USER user
|
24 |
-
ENV HOME=/home/user \
|
25 |
-
PATH=/home/user/.local/bin:$PATH
|
26 |
-
|
27 |
-
COPY --chown=user . $HOME/app
|
28 |
-
|
29 |
RUN git clone https://github.com/kapllan/SmartOpinion.git $HOME/app/SmartOpinion
|
30 |
|
31 |
WORKDIR $HOME/app/SmartOpinion
|
|
|
1 |
# Use an official Python runtime as a parent image
|
2 |
FROM --platform=amd64 python:3.10
|
3 |
|
4 |
+
# Set the working directory in the container
|
5 |
+
RUN useradd -m -u 1000 user
|
6 |
+
USER user
|
7 |
+
ENV HOME=/home/user \
|
8 |
+
PATH=/home/user/.local/bin:$PATH
|
9 |
+
|
10 |
+
COPY --chown=user . $HOME/app
|
11 |
+
|
12 |
# Set environment variables for Poetry
|
13 |
+
# ENV POETRY_VERSION=1.4.0 \
|
14 |
+
# POETRY_HOME="/opt/poetry" \
|
15 |
+
# POETRY_VIRTUALENVS_CREATE=false \
|
16 |
+
# POETRY_NO_INTERACTION=1
|
17 |
|
18 |
# Install Poetry
|
19 |
RUN apt-get update && apt-get install -y curl && \
|
20 |
curl -sSL https://install.python-poetry.org | python3 -
|
21 |
|
22 |
# Add Poetry to PATH
|
23 |
+
# ENV PATH="$POETRY_HOME/bin:$PATH"
|
24 |
|
25 |
# Install git
|
26 |
RUN apt-get update && apt-get install -y git && apt-get clean
|
27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
RUN git clone https://github.com/kapllan/SmartOpinion.git $HOME/app/SmartOpinion
|
29 |
|
30 |
WORKDIR $HOME/app/SmartOpinion
|