diamond-in commited on
Commit
a0d1076
·
verified ·
1 Parent(s): 3c888a1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -8
Dockerfile CHANGED
@@ -1,25 +1,25 @@
1
  # Use the official Python 3.9 slim image as a base
2
  FROM python:3.9-slim
3
 
4
- # Set the working directory
5
  WORKDIR /app
6
 
7
- # Create a non-root user for security
8
  RUN useradd -m -u 1000 user
9
  USER user
10
 
11
- # Set environment variables for the new user
12
  ENV HOME=/home/user \
13
  PATH=/home/user/.local/bin:$PATH
14
 
15
- # Copy the application files
16
  COPY --chown=user . .
17
 
18
- # Install Python dependencies
19
  RUN pip install --no-cache-dir -r requirements.txt
20
 
21
- # Expose the application port
22
  EXPOSE 7860
23
 
24
- # Command to run the application
25
- CMD ["python", "app.py"]
 
1
  # Use the official Python 3.9 slim image as a base
2
  FROM python:3.9-slim
3
 
4
+ # Set working directory
5
  WORKDIR /app
6
 
7
+ # Create a non-root user
8
  RUN useradd -m -u 1000 user
9
  USER user
10
 
11
+ # Set environment variables
12
  ENV HOME=/home/user \
13
  PATH=/home/user/.local/bin:$PATH
14
 
15
+ # Copy files
16
  COPY --chown=user . .
17
 
18
+ # Install dependencies
19
  RUN pip install --no-cache-dir -r requirements.txt
20
 
21
+ # Expose app port
22
  EXPOSE 7860
23
 
24
+ # Start app
25
+ CMD ["python", "app.py"]