Spaces:
Sleeping
Sleeping
- Dockerfile +10 -0
Dockerfile
CHANGED
@@ -24,6 +24,16 @@ RUN pip install --trusted-host pypi.python.org -r requirements.txt
|
|
24 |
# Copy the content of the local src directory to the working directory
|
25 |
COPY . .
|
26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
# Expose the port number on which the Flask app will run
|
28 |
EXPOSE 7860
|
29 |
|
|
|
24 |
# Copy the content of the local src directory to the working directory
|
25 |
COPY . .
|
26 |
|
27 |
+
# Create a user to run the application
|
28 |
+
RUN useradd -m -u 1000 user
|
29 |
+
USER user
|
30 |
+
ENV HOME=/home/user \
|
31 |
+
PATH=/home/user/.local/bin:$PATH
|
32 |
+
|
33 |
+
# Set the working directory in the user's home directory
|
34 |
+
WORKDIR $HOME/app
|
35 |
+
COPY --chown=user . $HOME/app
|
36 |
+
|
37 |
# Expose the port number on which the Flask app will run
|
38 |
EXPOSE 7860
|
39 |
|