Rolaficus commited on
Commit
bf0e5a6
·
verified ·
1 Parent(s): 79eb0b7

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +1 -2
Dockerfile CHANGED
@@ -12,14 +12,12 @@ RUN useradd -m -u 1000 user
12
 
13
  # 3. Set working directory and ownership
14
  WORKDIR /app
15
- # Important: chown triggers before we copy files to avoid permission issues later
16
  RUN chown user:user /app
17
 
18
  # 4. Switch to the user for all subsequent commands
19
  USER user
20
 
21
  # 5. Copy requirements and install
22
- # We copy with chown so the user owns the file
23
  COPY --chown=user:user requirements.txt requirements.txt
24
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
25
 
@@ -27,4 +25,5 @@ RUN pip install --no-cache-dir --upgrade -r requirements.txt
27
  COPY --chown=user:user . .
28
 
29
  # 7. Run the application
 
30
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
12
 
13
  # 3. Set working directory and ownership
14
  WORKDIR /app
 
15
  RUN chown user:user /app
16
 
17
  # 4. Switch to the user for all subsequent commands
18
  USER user
19
 
20
  # 5. Copy requirements and install
 
21
  COPY --chown=user:user requirements.txt requirements.txt
22
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
23
 
 
25
  COPY --chown=user:user . .
26
 
27
  # 7. Run the application
28
+ # We use app:app because the file is named app.py
29
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]