docker/bazarr/Dockerfile

30 lines
844 B
Docker

FROM docker.io/python:3.12-slim as base
ENV DEBIAN_FRONTEND=noninteractive \
VIRTUAL_ENV="/opt/venv" \
PATH="/opt/venv/bin:$PATH"
WORKDIR /app/
FROM base as build
RUN python -m venv "$VIRTUAL_ENV"
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
unzip \
&& rm -rf /var/lib/apt/lists/*
ARG URL="https://github.com/morpheus65535/bazarr/releases/latest/download/bazarr.zip"
RUN curl -LO "$URL" \
&& unzip bazarr.zip \
&& pip install -U --no-cache-dir -r requirements.txt \
&& rm bazarr.zip
FROM base
RUN useradd -m app
COPY --from=build /app/ .
COPY --from=build "$VIRTUAL_ENV" "$VIRTUAL_ENV"
COPY entrypoint.sh /usr/local/bin/
VOLUME /config/
EXPOSE 6767
ENTRYPOINT ["entrypoint.sh"]
CMD ["python", "bazarr.py", "--no-update", "--config=/config"]