Srevarshan1502 commited on
Commit
249fd49
·
1 Parent(s): 0a23aaf

Final Dockerfile fix: Explicitly copy index.html path

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -1
Dockerfile CHANGED
@@ -22,9 +22,18 @@ COPY requirements.txt .
22
  RUN pip install --no-cache-dir --upgrade pip && \
23
  pip install --no-cache-dir -r requirements.txt
24
 
 
 
 
 
 
 
 
25
  # Copy the application files
26
  COPY app.py .
27
- COPY index.html . # <--- ADDED THIS LINE to copy the HTML file
 
 
28
 
29
  # Create a non-root user for security
30
  RUN useradd --create-home --shell /bin/bash app && \
 
22
  RUN pip install --no-cache-dir --upgrade pip && \
23
  pip install --no-cache-dir -r requirements.txt
24
 
25
+ # --- Diagnostic step: List contents of /app before copying index.html ---
26
+ # This command will output the contents of the /app directory in the build logs.
27
+ # It can help diagnose if an unexpected 'file' is already present.
28
+ RUN echo "Contents of /app before copying index.html:"
29
+ RUN ls -la /app
30
+ # --- End Diagnostic step ---
31
+
32
  # Copy the application files
33
  COPY app.py .
34
+ # Explicitly copy index.html to /app/index.html to avoid any ambiguity with '.'
35
+ # This is the primary change to address "cannot copy to non-directory: .../app/file"
36
+ COPY index.html /app/index.html
37
 
38
  # Create a non-root user for security
39
  RUN useradd --create-home --shell /bin/bash app && \