jellyfin-exporter/Dockerfile
Hipstercat b58d336e59
All checks were successful
continuous-integration/drone Build is passing
Init
2023-10-17 18:25:00 +02:00

40 lines
737 B
Docker

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
EXPOSE 9224
ENTRYPOINT [ "/usr/bin/jellyfin_exporter" ]
CMD [ "/etc/jellyfin.yml" ]