From 1cc160e50d75bd5d2e7b27a7f4ab4806f0ce1968 Mon Sep 17 00:00:00 2001 From: Victoryel <38914844+victorcatalin@users.noreply.github.com> Date: Wed, 28 May 2025 09:32:15 +0300 Subject: [PATCH] Update Dockerfile I've modified the `Dockerfile` to use dpkg-architecture -qDEB_HOST_MULTIARCH to dynamically determine the correct library paths. This change should make the FFmpeg compilation step compatible with ARM64 and other architectures. --- Dockerfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 77dbc757..f4f256c0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -105,9 +105,10 @@ RUN git clone https://github.com/libass/libass.git && \ RUN git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg && \ cd ffmpeg && \ git checkout n7.0.2 && \ - PKG_CONFIG_PATH="/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/local/lib/pkgconfig" \ + DEB_HOST_MULTIARCH=$(dpkg-architecture -qDEB_HOST_MULTIARCH) && \ + PKG_CONFIG_PATH="/usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig:/usr/local/lib/pkgconfig" \ CFLAGS="-I/usr/include/freetype2" \ - LDFLAGS="-L/usr/lib/x86_64-linux-gnu" \ + LDFLAGS="-L/usr/lib/${DEB_HOST_MULTIARCH}" \ ./configure --prefix=/usr/local \ --enable-gpl \ --enable-pthreads \ @@ -134,7 +135,7 @@ RUN git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg && \ --enable-libsrt \ --enable-filter=drawtext \ --extra-cflags="-I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include" \ - --extra-ldflags="-L/usr/lib/x86_64-linux-gnu -lfreetype -lfontconfig" \ + --extra-ldflags="-L/usr/lib/${DEB_HOST_MULTIARCH} -lfreetype -lfontconfig" \ --enable-gnutls \ && make -j$(nproc) && \ make install && \ @@ -197,4 +198,4 @@ gunicorn --bind 0.0.0.0:8080 \ chmod +x /app/run_gunicorn.sh # Run the shell script -CMD ["/app/run_gunicorn.sh"] \ No newline at end of file +CMD ["/app/run_gunicorn.sh"]