Spaces:
Sleeping
Sleeping
ArnavGhost
commited on
Commit
•
6f6295e
1
Parent(s):
7064395
Update Dockerfile
Browse files- Dockerfile +4 -3
Dockerfile
CHANGED
@@ -7,6 +7,9 @@ RUN pip install --no-cache-dir --upgrade -r /tmp/requirements.txt && rm /tmp/req
|
|
7 |
# Create a non-root user with a home directory
|
8 |
RUN useradd -m -u 1000 user
|
9 |
|
|
|
|
|
|
|
10 |
# Set environment variables
|
11 |
ENV HOME=/home/user \
|
12 |
PATH=/home/user/.local/bin:$PATH
|
@@ -15,10 +18,8 @@ ENV HOME=/home/user \
|
|
15 |
WORKDIR $HOME/app
|
16 |
|
17 |
# Copy the application code and set the correct permissions
|
18 |
-
COPY --chown=user
|
19 |
|
20 |
-
# Switch to the non-root user
|
21 |
-
USER user
|
22 |
|
23 |
# Expose the port that the FastAPI app will run on
|
24 |
EXPOSE 7860
|
|
|
7 |
# Create a non-root user with a home directory
|
8 |
RUN useradd -m -u 1000 user
|
9 |
|
10 |
+
# Switch to the non-root user
|
11 |
+
USER user
|
12 |
+
|
13 |
# Set environment variables
|
14 |
ENV HOME=/home/user \
|
15 |
PATH=/home/user/.local/bin:$PATH
|
|
|
18 |
WORKDIR $HOME/app
|
19 |
|
20 |
# Copy the application code and set the correct permissions
|
21 |
+
COPY --chown=user . $HOME/app
|
22 |
|
|
|
|
|
23 |
|
24 |
# Expose the port that the FastAPI app will run on
|
25 |
EXPOSE 7860
|