feat: add ffprobe and mkvmerge to docker image + requirements
This commit is contained in:
parent
7a3fa8c309
commit
be91526c90
26
Dockerfile
26
Dockerfile
@ -1,7 +1,29 @@
|
|||||||
FROM python:3.13.3-alpine
|
FROM debian:bullseye-slim AS builder
|
||||||
|
|
||||||
|
# Install ffmpeg and mkvtoolnix
|
||||||
|
# but only keep the binaries and libs for ffprobe and mkvmerge
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
ffmpeg mkvtoolnix \
|
||||||
|
&& mkdir -p /artifacts/bin /artifacts/lib \
|
||||||
|
&& cp $(which ffprobe) /artifacts/bin/ \
|
||||||
|
&& cp $(which mkvmerge) /artifacts/bin/ \
|
||||||
|
&& ldd $(which ffprobe) | awk '{print $3}' | xargs -I '{}' cp -v '{}' /artifacts/lib/ || true \
|
||||||
|
&& ldd $(which mkvmerge) | awk '{print $3}' | xargs -I '{}' cp -v '{}' /artifacts/lib/ || true
|
||||||
|
|
||||||
|
# Must be the same base as builder image for shared libraries compatibility
|
||||||
|
FROM python:3.13.3-slim-bullseye
|
||||||
|
|
||||||
|
COPY --from=builder /artifacts/bin/* /usr/local/bin/
|
||||||
|
COPY --from=builder /artifacts/lib/* /usr/local/lib/
|
||||||
|
ENV LD_LIBRARY_PATH=/usr/local/lib
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY requirements.txt .
|
||||||
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
CMD ["python3.13", "src/server.py"]
|
EXPOSE 8000
|
||||||
|
|
||||||
|
CMD ["python", "src/server.py"]
|
1
requirements.txt
Normal file
1
requirements.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
watchdog==6.0.0
|
Loading…
x
Reference in New Issue
Block a user