7e2dd3c407
This reverts commit 0e05bf1c54.
36 lines
997 B
Docker
36 lines
997 B
Docker
# syntax=docker/dockerfile:1
|
|
|
|
FROM python:3.11-alpine
|
|
|
|
ENV PYTHONUNBUFFERED=1 \
|
|
PYTHONDONTWRITEBYTECODE=1 \
|
|
PIP_NO_CACHE_DIR=1 \
|
|
PIP_DISABLE_PIP_VERSION_CHECK=1
|
|
|
|
RUN --mount=type=cache,target=/var/cache/apk,sharing=locked \
|
|
apk add --no-cache \
|
|
docker-cli \
|
|
ca-certificates
|
|
|
|
WORKDIR /app
|
|
|
|
COPY requirements.txt .
|
|
|
|
RUN --mount=type=cache,target=/root/.cache/pip \
|
|
pip install --no-cache-dir -r requirements.txt
|
|
|
|
COPY collectors/ ./collectors/
|
|
COPY exporters/ ./exporters/
|
|
COPY aggregator.py main.py ./
|
|
|
|
HEALTHCHECK --interval=60s --timeout=10s --start-period=10s --retries=3 \
|
|
CMD python -c "import sys; sys.exit(0)"
|
|
|
|
CMD ["python", "-u", "main.py"]
|
|
|
|
LABEL org.opencontainers.image.title="Simple Docker Metrics Collector" \
|
|
org.opencontainers.image.description="Simple Docker monitoring tool for Graphite" \
|
|
org.opencontainers.image.vendor="simple-docker-metrics" \
|
|
org.opencontainers.image.version="1.0" \
|
|
maintainer="simple-docker-metrics"
|