jellyfin-exporter/Dockerfile

40 lines
737 B
Docker
Raw Permalink Normal View History

2023-10-17 18:25:00 +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 21:37:08 +02:00
EXPOSE 9222
2023-10-17 18:25:00 +02:00
ENTRYPOINT [ "/usr/bin/jellyfin_exporter" ]
CMD [ "/etc/jellyfin.yml" ]