25 lines
513 B
Docker
25 lines
513 B
Docker
# Statping clone - HTTP/HTTPS and TCP monitoring
|
|
FROM python:3.11-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# Install dependencies
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy application
|
|
COPY app.py .
|
|
COPY app/ app/
|
|
COPY templates/ templates/
|
|
COPY static/ static/
|
|
|
|
# Run as non-root user
|
|
RUN addgroup --system --gid 1000 appgroup && \
|
|
adduser --system --uid 1000 --gid 1000 --no-create-home appuser
|
|
RUN chown -R appuser:appgroup /app
|
|
USER appuser
|
|
|
|
EXPOSE 8080
|
|
|
|
CMD ["python", "-u", "app.py"]
|