FROM docker.io/debian:12-slim as base ENV DEBIAN_FRONTEND=noninteractive WORKDIR /app/ FROM base as build RUN apt-get update \ && apt-get install -y --no-install-recommends \ ca-certificates \ curl \ && rm -rf /var/lib/apt/lists/* ARG SONARR="https://services.sonarr.tv/v1/download/main/latest?version=4&os=linux&arch=x64" RUN curl -L "$SONARR" | tar xz --strip-components=1 FROM base RUN useradd -m app RUN apt-get update \ && apt-get install -y --no-install-recommends \ libicu72 \ libsqlite3-0 \ libssl3 \ && rm -rf /var/lib/apt/lists/* COPY --from=build /app/ . COPY entrypoint.sh /usr/local/bin/ VOLUME /config/ EXPOSE 8989 ENTRYPOINT ["entrypoint.sh"] CMD ["./Sonarr", "-nobrowser", "-data=/config"]