Python image forgets requirements.txt
Summary: The Dockerfile installs from requirements.txt before that file exists inside the build context layer.
Failure type: missing_build_context_file
Ecosystem: python
Difficulty: easy

Repository files:
path: Dockerfile
content: FROM python:3.12-slim
WORKDIR /app
COPY app.py .
RUN pip install --no-cache-dir -r requirements.txt
CMD ["python", "app.py"]
path: requirements.txt
content: flask==3.0.3
path: app.py
content: from flask import Flask
app = Flask(__name__)
@app.get("/")
def home():
    return {"status": "ok"}
if __name__ == "__main__":
    app.run(host="0.0.0.0", port=8080)

Failure log:
Step 4/5 : RUN pip install --no-cache-dir -r requirements.txt
ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt'

Build command: docker build -t sabnock/sbd-0001 .
Verify commands:
docker build -t sabnock/sbd-0001 .

Oracle patch:
diff --git a/Dockerfile b/Dockerfile
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,5 +1,6 @@
 FROM python:3.12-slim
 WORKDIR /app
-COPY app.py .
+COPY requirements.txt .
 RUN pip install --no-cache-dir -r requirements.txt
+COPY app.py .
 CMD ["python", "app.py"]

Scoring - must touch:
Dockerfile
Scoring - must contain:
path: Dockerfile
text: COPY requirements.txt .
Scoring - must not contain: