| 12345678910111213141516171819202122232425 |
- # Use a lightweight Python base
- FROM python:3.11-slim
- # Set working directory
- WORKDIR /app
- # Install Flask
- RUN pip install --no-cache-dir flask
- # Copy the app into the container
- COPY app.py /app/app.py
- # Set environment variables
- # Default value file location inside container
- ENV VALUE_FILE=/data/pct
- ENV PORT=8080
- # Create the /data directory where the file will be mounted
- RUN mkdir -p /data
- # Expose port
- EXPOSE 8080
- # Run the server
- CMD ["python", "app.py"]
|