Files
leox-gpon-monitoring/Dockerfile
Mateusz Gruszczyński 09f3e6e65d release
2026-01-02 23:02:38 +01:00

38 lines
635 B
Docker

FROM python:3.13-alpine
WORKDIR /app
# Install dependencies
RUN apk add --no-cache \
rrdtool \
rrdtool-dev \
gcc \
musl-dev \
python3-dev \
libffi-dev \
openssl-dev \
wget
# Copy requirements first (better caching)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY app.py .
COPY config.py .
COPY collector.py .
COPY rrd_manager.py .
# Copy static files and templates
COPY static/ ./static/
COPY templates/ ./templates/
# Create RRD directory
RUN mkdir -p /data/rrd
ENV LISTEN_PORT=8080
EXPOSE $LISTEN_PORT
# Run app
CMD ["python", "app.py"]