Dockerfile 470 B

12345678910111213141516171819202122232425
  1. # Use a lightweight Python base
  2. FROM python:3.11-slim
  3. # Set working directory
  4. WORKDIR /app
  5. # Install Flask
  6. RUN pip install --no-cache-dir flask
  7. # Copy the app into the container
  8. COPY app.py /app/app.py
  9. # Set environment variables
  10. # Default value file location inside container
  11. ENV VALUE_FILE=/data/pct
  12. ENV PORT=8080
  13. # Create the /data directory where the file will be mounted
  14. RUN mkdir -p /data
  15. # Expose port
  16. EXPOSE 8080
  17. # Run the server
  18. CMD ["python", "app.py"]