79212497

Date: 2024-11-21 18:29:33
Score: 2
Natty:
Report link

For the folks who might get the same issue, I find a way it works, though I don't know why. I change the work directory from /app to /workspace and it magically worked. Below is the Dockerfile:

FROM python:3.12-slim

# Create and set working directory explicitly
RUN mkdir -p /workspace
WORKDIR /workspace

COPY requirements.txt .

RUN pip install --upgrade pip setuptools wheel \
    && pip install -r requirements.txt

COPY . .

# Add debugging to see where we are and what files exist
RUN pwd && \
    ls -la && \
    echo "Current working directory contains:"

CMD ["python", "main.py"]
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Me too answer (2.5): get the same issue
  • Self-answer (0.5):
Posted by: Laodao