Skip to content

Commit

Permalink
docker: static build of ffmpeg needs dependencies also static
Browse files Browse the repository at this point in the history
Signed-off-by: deadprogram <[email protected]>
  • Loading branch information
deadprogram committed Oct 2, 2024
1 parent 50d21aa commit d48bb67
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions Dockerfile.opencv-static
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@ FROM --platform=linux/amd64 golang:1.22-bullseye AS opencv-base-amd64
LABEL maintainer="hybridgroup"
RUN apt-get update && apt-get -y install \
autoconf automake libass-dev libgnutls28-dev \
libmp3lame-dev libtool \
libvorbis-dev libxcb1-dev \
libxcb-shm0-dev libxcb-xfixes0-dev \
libmp3lame-dev libtool libvorbis-dev \
meson ninja-build pkg-config \
texinfo wget yasm \
zlib1g-dev libx264-dev libx265-dev libnuma-dev libvpx-dev \
libopus-dev libdav1d-dev \
git build-essential cmake pkg-config unzip libgtk-3-dev \
git build-essential cmake pkg-config unzip \
curl ca-certificates libcurl4-openssl-dev libssl-dev \
libharfbuzz-dev libfreetype6-dev \
nasm && \
Expand All @@ -32,8 +30,9 @@ RUN wget -O ffmpeg-5.0.tar.bz2 "https://www.ffmpeg.org/releases/ffmpeg-5.0.3.tar
tar -xf ffmpeg-5.0.tar.bz2

RUN cd ffmpeg-5.0.3 && \
./configure --enable-shared --enable-gpl --enable-libx264 --enable-libx265 --enable-libvpx --enable-zlib \
--disable-sdl2 --disable-vaapi --disable-vdpau --disable-v4l2-m2m && \
./configure --pkg-config-flags="--static" \
--enable-static --disable-shared --enable-gpl --enable-libx264 --enable-libx265 --enable-libvpx --enable-zlib \
--disable-sdl2 --disable-vaapi --disable-vdpau --disable-v4l2-m2m --disable-doc && \
make -j $(nproc --all) && make install && ldconfig

FROM --platform=linux/amd64 opencv-base-amd64 AS opencv-build-amd64
Expand Down Expand Up @@ -103,17 +102,14 @@ RUN cd opencv-${OPENCV_VERSION} && \

FROM --platform=linux/arm64 golang:1.22-bullseye AS opencv-base-arm64
LABEL maintainer="hybridgroup"

RUN apt-get update && apt-get -y install \
autoconf automake libass-dev libgnutls28-dev \
libmp3lame-dev libtool \
libvorbis-dev libxcb1-dev \
libxcb-shm0-dev libxcb-xfixes0-dev \
libmp3lame-dev libtool libvorbis-dev \
meson ninja-build pkg-config \
texinfo wget yasm \
zlib1g-dev libx264-dev libx265-dev libnuma-dev libvpx-dev \
libopus-dev libdav1d-dev \
git build-essential cmake pkg-config unzip libgtk-3-dev \
git build-essential cmake pkg-config unzip \
curl ca-certificates libcurl4-openssl-dev libssl-dev \
libharfbuzz-dev libfreetype6-dev \
nasm && \
Expand All @@ -123,8 +119,9 @@ RUN wget -O ffmpeg-5.0.tar.bz2 "https://www.ffmpeg.org/releases/ffmpeg-5.0.3.tar
tar -xf ffmpeg-5.0.tar.bz2

RUN cd ffmpeg-5.0.3 && \
./configure --enable-shared --enable-gpl --enable-libx264 --enable-libx265 --enable-libvpx --enable-zlib \
--disable-sdl2 --disable-vaapi --disable-vdpau --disable-v4l2-m2m && \
./configure --pkg-config-flags="--static" \
--enable-static --disable-shared --enable-gpl --enable-libx264 --enable-libx265 --enable-libvpx --enable-zlib \
--disable-sdl2 --disable-vaapi --disable-vdpau --disable-v4l2-m2m --disable-doc && \
make -j $(nproc --all) && make install && ldconfig

FROM --platform=linux/arm64 opencv-base-arm64 AS opencv-build-arm64
Expand Down

0 comments on commit d48bb67

Please sign in to comment.