Swapnil-101 commited on
Commit
0f0912e
·
verified ·
1 Parent(s): cf053f6

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +1 -8
Dockerfile CHANGED
@@ -3,8 +3,6 @@ FROM python:3.9
3
  # Create a user with UID 1000
4
  RUN useradd -m -u 1000 user
5
 
6
- RUN pwd && ls -l
7
-
8
  # Set the working directory and user environment variables
9
  ENV HOME=/ \
10
  PATH=/bin:$PATH
@@ -25,10 +23,7 @@ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
25
  RUN mkdir -p $HOME/.cache && chmod 777 $HOME/.cache
26
 
27
  # Create the database file and set permissions
28
- RUN touch $HOME/users.db && chmod 777 $HOME/users.db
29
-
30
- # Change ownership of mentor.txt and temp_mentor.txt
31
- RUN chown user:user $HOME/mentor.txt $HOME/temp_mentor.txt
32
 
33
  # Switch back to the user
34
  USER user
@@ -36,7 +31,5 @@ USER user
36
  # Set the working directory for the application
37
  WORKDIR $HOME
38
 
39
- RUN pwd && ls -l
40
-
41
  # Start the application using gunicorn
42
  CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:7860", "--timeout", "300", "main:app"]
 
3
  # Create a user with UID 1000
4
  RUN useradd -m -u 1000 user
5
 
 
 
6
  # Set the working directory and user environment variables
7
  ENV HOME=/ \
8
  PATH=/bin:$PATH
 
23
  RUN mkdir -p $HOME/.cache && chmod 777 $HOME/.cache
24
 
25
  # Create the database file and set permissions
26
+ RUN touch $HOME/users.db && chown user:user $HOME/users.db && chmod 777 $HOME/users.db
 
 
 
27
 
28
  # Switch back to the user
29
  USER user
 
31
  # Set the working directory for the application
32
  WORKDIR $HOME
33
 
 
 
34
  # Start the application using gunicorn
35
  CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:7860", "--timeout", "300", "main:app"]