Files
port-ui/Dockerfile

22 lines
470 B
Docker
Raw Normal View History

2025-03-18 14:27:07 +01:00
# Base image for Python
2025-01-08 14:59:36 +01:00
FROM python:slim
2025-03-18 14:27:07 +01:00
# Set the working directory
2025-01-08 14:59:36 +01:00
WORKDIR /app
2025-03-18 14:27:07 +01:00
# Copy and install dependencies
2025-01-08 14:59:36 +01:00
COPY app/requirements.txt requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
2025-03-18 14:27:07 +01:00
# Copy application code
2025-01-08 14:59:36 +01:00
COPY app/ .
2025-07-05 09:32:07 +02:00
# Set default port environment variable
ENV PORT=5000
2025-01-08 14:59:36 +01:00
2025-07-05 09:32:07 +02:00
# Expose port (optional for documentation)
EXPOSE ${PORT}
# Start command using shell to allow env substitution
CMD ["sh", "-c", "exec python app.py --port=${PORT}"]