You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
1.8 KiB
71 lines
1.8 KiB
FROM debian:12
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
# ----------------------------------------------------------
|
|
# System + PHP (PHP 8.2 native)
|
|
# ----------------------------------------------------------
|
|
RUN apt-get update && apt-get install -y \
|
|
ffmpeg \
|
|
curl \
|
|
ca-certificates \
|
|
bash \
|
|
php-cli \
|
|
php-intl \
|
|
php-json \
|
|
php-mbstring \
|
|
php-xml \
|
|
php-curl \
|
|
php-zip \
|
|
python3 \
|
|
python3-pip \
|
|
python3-venv \
|
|
\
|
|
# build deps for mp4v2
|
|
git \
|
|
build-essential \
|
|
autoconf \
|
|
automake \
|
|
libtool \
|
|
pkg-config \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# ----------------------------------------------------------
|
|
# Python venv (PEP 668 compliant)
|
|
# ----------------------------------------------------------
|
|
RUN python3 -m venv /opt/venv
|
|
ENV PATH="/opt/venv/bin:/usr/local/bin:$PATH"
|
|
|
|
# ----------------------------------------------------------
|
|
# Build & install mp4v2 (mp4info)
|
|
# ----------------------------------------------------------
|
|
WORKDIR /tmp
|
|
|
|
RUN git clone https://github.com/sandreas/mp4v2 \
|
|
&& cd mp4v2 \
|
|
&& ./configure \
|
|
&& make -j$(nproc) \
|
|
&& make install \
|
|
&& echo "/usr/local/lib" > /etc/ld.so.conf.d/mp4v2.conf \
|
|
&& ldconfig \
|
|
&& cd / \
|
|
&& rm -rf /tmp/mp4v2
|
|
|
|
# ----------------------------------------------------------
|
|
# Install m4b-tool
|
|
# ----------------------------------------------------------
|
|
RUN curl -L https://github.com/sandreas/m4b-tool/releases/latest/download/m4b-tool.phar \
|
|
-o /usr/local/bin/m4b-tool \
|
|
&& chmod +x /usr/local/bin/m4b-tool
|
|
|
|
# ----------------------------------------------------------
|
|
# App
|
|
# ----------------------------------------------------------
|
|
WORKDIR /app
|
|
COPY requirements.txt /app/requirements.txt
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
COPY . /app
|
|
|
|
CMD ["bash"]
|