Skip to main content

Use slim Python image

FROM python:3.9-slim

Set working directory

WORKDIR /app

Install dependencies

RUN pip install —no-cache-dir flask python-json-logger

Copy the app code

COPY app.py .

Expose Flask default port (if running locally or behind K8s ingress)

EXPOSE 8080

Run the app

CMD [“python”, “app.py”]