scott12355 commited on
Commit
69f0735
·
verified ·
1 Parent(s): e2fa45a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -17
Dockerfile CHANGED
@@ -1,20 +1,8 @@
1
- # Set up a new user named "user" with user ID 1000
2
- RUN useradd -m -u 1000 user
3
-
4
- # Switch to the "user" user
5
- USER user
6
-
7
- # Set home to the user's home directory
8
- ENV HOME=/home/user \
9
- PATH=/home/user/.local/bin:$PATH
10
-
11
- # Set the working directory to the user's home directory
12
- WORKDIR $HOME/app
13
-
14
  # Use an official Python runtime as a parent image
15
  FROM python:3.9.19
16
 
17
  # Set the working directory in the container
 
18
 
19
  # Copy the current directory contents into the container at /app
20
  COPY . /app
@@ -22,10 +10,9 @@ COPY . /app
22
  # Install any needed packages specified in requirements.txt
23
  RUN pip install --no-cache-dir -r requirements.txt
24
 
 
25
  # Make port 5500 available to the world outside this container
26
- EXPOSE 5500
27
 
28
  # Run app.py when the container launches
29
- CMD ["python", "app.py", "--host", "0.0.0.0", "--port", "5500"]
30
-
31
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  # Use an official Python runtime as a parent image
2
  FROM python:3.9.19
3
 
4
  # Set the working directory in the container
5
+ WORKDIR /app
6
 
7
  # Copy the current directory contents into the container at /app
8
  COPY . /app
 
10
  # Install any needed packages specified in requirements.txt
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
+ COPY . .
14
  # Make port 5500 available to the world outside this container
15
+ EXPOSE 7860
16
 
17
  # Run app.py when the container launches
18
+ CMD ["python", "app.py", "--host", "0.0.0.0", "--port", "7860"]