jellyseer-exporter/Dockerfile

40 lines
739 B
Docker
Raw Permalink Normal View History

2023-10-22 16:59:09 +02:00
ARG alpine_version=3.18.4
FROM alpine:${alpine_version} as base
RUN apk update && apk upgrade
RUN apk add --no-cache \
ca-certificates \
py3-gunicorn \
py3-paramiko \
py3-pip \
py3-prometheus-client \
py3-requests \
py3-werkzeug \
py3-wheel \
py3-yaml \
python3
FROM base as builder
ADD . /src
WORKDIR /opt
RUN pip3 wheel --no-deps /src
FROM base as runtime
COPY --from=builder /opt /opt
RUN pip3 install --no-cache-dir --no-index /opt/*py3-none-any.whl && \
rm /opt/*py3-none-any.whl && \
addgroup -S -g 101 prometheus && \
adduser -D -H -S -G prometheus -u 101 prometheus
USER prometheus
2023-10-22 17:04:24 +02:00
EXPOSE 9223
2023-10-22 16:59:09 +02:00
ENTRYPOINT [ "/usr/bin/jellyseer_exporter" ]
CMD [ "/etc/jellyseer.yml" ]