Files
rippy/docker/worker/Dockerfile
T
Hitonabi 4aa237541f
Ampel / ampel (push) Successful in 36s
Fix: makemkvcon landete in /usr statt /usr/local — COPY nahm es nie mit
Deploy-Befund 23.07.: Image frisch gebaut, GPL-Teile da, aber makemkvcon
fehlte — makemkv-bin installiert ohne PREFIX nach /usr, die Final-Stage
kopiert nur /usr/local. Jetzt PREFIX=/usr/local + test -x als Build-Beweis.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-23 15:14:14 +02:00

77 lines
2.4 KiB
Docker

# Worker-Image: MakeMKV (verlustfrei, Etappe 10) + abcde/cdparanoia (CD→FLAC).
#
# Multi-Stage: makemkv-oss wird aus Quellen gebaut (GPL-Teil), makemkv-bin ist
# das proprietäre Binärpaket (EULA wird per tmp/eula_accepted akzeptiert —
# Standard-Mechanismus des Makefiles für nicht-interaktive Builds).
# Beide Stages sind auf bookworm gepinnt, damit die libavcodec-Version passt.
#
# Vorher stand hier `makepkg` (ein Arch-Linux-Werkzeug, existiert in Debian
# nicht) — das Image war seit dem 23.07. gar nicht mehr baubar. Und es fehlte
# schlicht JEDES Ripping-Werkzeug: weder HandBrake noch abcde noch MakeMKV
# waren installiert.
FROM python:3.12-slim-bookworm AS makemkv-build
ARG MAKEMKV_VERSION=1.18.4
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
pkg-config \
ca-certificates \
curl \
libssl-dev \
libexpat1-dev \
libavcodec-dev \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /build
RUN curl -fsSL -o oss.tar.gz "https://www.makemkv.com/download/makemkv-oss-${MAKEMKV_VERSION}.tar.gz" \
&& curl -fsSL -o bin.tar.gz "https://www.makemkv.com/download/makemkv-bin-${MAKEMKV_VERSION}.tar.gz" \
&& tar xzf oss.tar.gz \
&& tar xzf bin.tar.gz
RUN cd "makemkv-oss-${MAKEMKV_VERSION}" \
&& ./configure --disable-gui --prefix=/usr/local \
&& make -j"$(nproc)" \
&& make install
# PREFIX explizit: makemkv-bin installiert sonst nach /usr — und das COPY der
# Final-Stage nimmt nur /usr/local mit (Deploy 23.07.: makemkvcon fehlte im Image).
# Das abschließende test -x lässt den Build laut scheitern statt still lückenhaft.
RUN cd "makemkv-bin-${MAKEMKV_VERSION}" \
&& mkdir -p tmp \
&& touch tmp/eula_accepted \
&& make PREFIX=/usr/local \
&& make install PREFIX=/usr/local \
&& test -x /usr/local/bin/makemkvcon
FROM python:3.12-slim-bookworm
RUN apt-get update && apt-get install -y --no-install-recommends \
libssl3 \
libexpat1 \
zlib1g \
libavcodec59 \
abcde \
cdparanoia \
cd-discid \
flac \
&& rm -rf /var/lib/apt/lists/*
COPY --from=makemkv-build /usr/local /usr/local
RUN ldconfig
WORKDIR /app
COPY docker/worker/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY docker/worker/ .
RUN chmod +x /app/entrypoint.sh
ENTRYPOINT ["/app/entrypoint.sh"]
CMD ["celery", "-A", "celery_app", "worker", "--loglevel=info"]