19 lines
511 B
Docker

FROM python:3.12-slim
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN python -m pip install --upgrade pip setuptools wheel \
&& pip install --no-cache-dir -r requirements.txt
COPY splunk_poller.py .
RUN useradd -u 10001 -m appuser && chown -R appuser /app
USER appuser
VOLUME ["/app/out"]
ENTRYPOINT ["python", "-u", "splunk_poller.py"]