11FROM quay.io/pypa/manylinux1_i686:latest
22
33RUN curl -O -L https://download.qt.io/archive/qt/4.8/4.8.7/qt-everywhere-opensource-src-4.8.7.tar.gz && \
4- tar -xf qt-everywhere-opensource-src-4.8.7.tar.gz && \
5- cd qt-everywhere* && \
6- ./configure -prefix /opt/Qt4.8.7 -release -opensource -confirm-license && \
7- gmake -j5 && \
8- gmake install && \
9- cd .. && \
10- rm -rf qt-everywhere-opensource-src-4.8.7 && \
11- rm qt-everywhere-opensource-src-4.8.7.tar.gz
4+ tar -xf qt-everywhere-opensource-src-4.8.7.tar.gz && \
5+ cd qt-everywhere* && \
6+ #configure does a bootstrap make under the hood
7+ #manylinux1 is too old to have `nproc`
8+ export MAKEFLAGS=-j$(getconf _NPROCESSORS_ONLN) && \
9+ #OpenCV only links against QtCore, QtGui, QtTest
10+ ./configure -prefix /opt/Qt4.8.7 -release -opensource -confirm-license \
11+ -no-sql-sqlite -no-qt3support -no-xmlpatterns -no-multimedia \
12+ -no-webkit -no-script -no-declarative -no-dbus -make libs && \
13+ make && \
14+ make install && \
15+ cd .. && \
16+ rm -rf qt-everywhere-opensource-src-4.8.7 && \
17+ rm qt-everywhere-opensource-src-4.8.7.tar.gz
1218
1319ENV QTDIR /opt/Qt4.8.7
1420ENV PATH "$QTDIR/bin:$PATH"
1521
1622RUN curl -O -L https://cmake.org/files/v3.9/cmake-3.9.0.tar.gz && \
17- tar -xf cmake-3.9.0.tar.gz && \
18- cd cmake-3.9.0 && \
19- true '#manylinux1 provides curl-devel equivalent and libcurl statically linked \
20- against the same newer OpenSSL as other source-built tools \
21- (1.0.2s as of this writing)' && \
22- yum -y install zlib-devel && \
23- ./configure --system-curl && \
24- make -j4 && \
25- make install && \
26- cd .. && \
27- rm -rf cmake-3.9.0*
23+ tar -xf cmake-3.9.0.tar.gz && \
24+ cd cmake-3.9.0 && \
25+ #manylinux1 provides curl-devel equivalent and libcurl statically linked
26+ # against the same newer OpenSSL as other source-built tools
27+ # (1.0.2s as of this writing)
28+ yum -y install zlib-devel && \
29+ #configure does a bootstrap make under the hood
30+ export MAKEFLAGS=-j$(getconf _NPROCESSORS_ONLN) && \
31+ ./configure --system-curl && \
32+ make && \
33+ make install && \
34+ cd .. && \
35+ rm -rf cmake-3.9.0*
2836
2937# https://trac.ffmpeg.org/wiki/CompilationGuide/Centos#GettheDependencies
3038# manylinux provides the toolchain and git; we provide cmake
@@ -33,69 +41,69 @@ RUN yum install freetype-devel bzip2-devel zlib-devel -y && \
3341
3442# Newer openssl configure requires newer perl
3543RUN curl -O -L https://www.cpan.org/src/5.0/perl-5.20.1.tar.gz && \
36- tar -xf perl-5.20.1.tar.gz && \
37- cd perl-5.20.1 && \
38- ./Configure -des -Dprefix="$HOME/openssl_build" && \
39- true ' #perl build scripts do much redundant work \
40- if running "make install" separately' && \
41- make install -j4 && \
42- cd .. && \
43- rm -rf perl-5.20.1*
44+ tar -xf perl-5.20.1.tar.gz && \
45+ cd perl-5.20.1 && \
46+ ./Configure -des -Dprefix="$HOME/openssl_build" && \
47+ #perl build scripts do much redundant work
48+ # if running "make install" separately
49+ make install -j$(getconf _NPROCESSORS_ONLN) && \
50+ cd .. && \
51+ rm -rf perl-5.20.1*
4452
4553RUN cd ~/ffmpeg_sources && \
46- curl -O -L https://github.com/openssl/openssl/archive/OpenSSL_1_1_1c.tar.gz && \
47- tar -xf OpenSSL_1_1_1c.tar.gz && \
48- cd openssl-OpenSSL_1_1_1c && \
49- true ' #in i686, ./config detects x64 in i686 without linux32 \
50- when run from "docker build"' && \
51- PERL="$HOME/openssl_build/bin/perl" linux32 ./config --prefix="$HOME/ffmpeg_build" --openssldir="$HOME/ffmpeg_build" shared zlib && \
52- make -j4 && \
53- true ' #skip installing documentation' && \
54- make install_sw && \
54+ curl -O -L https://github.com/openssl/openssl/archive/OpenSSL_1_1_1c.tar.gz && \
55+ tar -xf OpenSSL_1_1_1c.tar.gz && \
56+ cd openssl-OpenSSL_1_1_1c && \
57+ #in i686, ./config detects x64 in i686 container without linux32
58+ # when run from "docker build"
59+ PERL="$HOME/openssl_build/bin/perl" linux32 ./config --prefix="$HOME/ffmpeg_build" --openssldir="$HOME/ffmpeg_build" shared zlib && \
60+ make -j$(getconf _NPROCESSORS_ONLN) && \
61+ #skip installing documentation
62+ make install_sw && \
5563 rm -rf ~/openssl_build
5664
5765RUN cd ~/ffmpeg_sources && \
58- curl -O -L http://www.nasm.us/pub/nasm/releasebuilds/2.13.02/nasm-2.13.02.tar.bz2 && \
59- tar -xf nasm-2.13.02.tar.bz2 && cd nasm-2.13.02 && ./autogen.sh && \
60- ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" && \
61- make -j4 && \
62- make install
66+ curl -O -L http://www.nasm.us/pub/nasm/releasebuilds/2.13.02/nasm-2.13.02.tar.bz2 && \
67+ tar -xf nasm-2.13.02.tar.bz2 && cd nasm-2.13.02 && ./autogen.sh && \
68+ ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" && \
69+ make -j$(getconf _NPROCESSORS_ONLN) && \
70+ make install
6371
6472RUN cd ~/ffmpeg_sources && \
65- curl -O -L http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz && \
66- tar -xf yasm-1.3.0.tar.gz && \
67- cd yasm-1.3.0 && \
68- ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" && \
69- make -j4 && \
70- make install
73+ curl -O -L http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz && \
74+ tar -xf yasm-1.3.0.tar.gz && \
75+ cd yasm-1.3.0 && \
76+ ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" && \
77+ make -j$(getconf _NPROCESSORS_ONLN) && \
78+ make install
7179
7280RUN cd ~/ffmpeg_sources && \
73- git clone --depth 1 https://chromium.googlesource.com/webm/libvpx.git && \
74- cd libvpx && \
75- ./configure --prefix="$HOME/ffmpeg_build" --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=yasm --enable-pic --enable-shared && \
76- make -j4 && \
77- make install
81+ git clone --depth 1 https://chromium.googlesource.com/webm/libvpx.git && \
82+ cd libvpx && \
83+ ./configure --prefix="$HOME/ffmpeg_build" --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=yasm --enable-pic --enable-shared && \
84+ make -j$(getconf _NPROCESSORS_ONLN) && \
85+ make install
7886
7987RUN cd ~/ffmpeg_sources && \
80- curl -O -L https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2 && \
81- tar -xf ffmpeg-snapshot.tar.bz2 && \
82- cd ffmpeg && \
83- PATH=~/bin:$PATH && \
84- PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib" --enable-openssl --enable-libvpx --enable-shared --enable-pic --bindir="$HOME/bin" && \
85- make -j4 && \
86- make install && \
87- echo "/root/ffmpeg_build/lib/" >> /etc/ld.so.conf && \
88- ldconfig && \
89- rm -rf ~/ffmpeg_sources
88+ curl -O -L https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2 && \
89+ tar -xf ffmpeg-snapshot.tar.bz2 && \
90+ cd ffmpeg && \
91+ PATH=~/bin:$PATH && \
92+ PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib" --enable-openssl --enable-libvpx --enable-shared --enable-pic --bindir="$HOME/bin" && \
93+ make -j$(getconf _NPROCESSORS_ONLN) && \
94+ make install && \
95+ echo "/root/ffmpeg_build/lib/" >> /etc/ld.so.conf && \
96+ ldconfig && \
97+ rm -rf ~/ffmpeg_sources
9098
9199ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig:/root/ffmpeg_build/lib/pkgconfig
92100ENV LDFLAGS -L/root/ffmpeg_build/lib
93101
94102RUN curl -O https://raw.githubusercontent.com/torvalds/linux/v4.14/include/uapi/linux/videodev2.h && \
95- curl -O https://raw.githubusercontent.com/torvalds/linux/v4.14/include/uapi/linux/v4l2-common.h && \
96- curl -O https://raw.githubusercontent.com/torvalds/linux/v4.14/include/uapi/linux/v4l2-controls.h && \
97- curl -O https://raw.githubusercontent.com/torvalds/linux/v4.14/include/linux/compiler.h && \
98- mv videodev2.h v4l2-common.h v4l2-controls.h compiler.h /usr/include/linux
103+ curl -O https://raw.githubusercontent.com/torvalds/linux/v4.14/include/uapi/linux/v4l2-common.h && \
104+ curl -O https://raw.githubusercontent.com/torvalds/linux/v4.14/include/uapi/linux/v4l2-controls.h && \
105+ curl -O https://raw.githubusercontent.com/torvalds/linux/v4.14/include/linux/compiler.h && \
106+ mv videodev2.h v4l2-common.h v4l2-controls.h compiler.h /usr/include/linux
99107
100108#in i686, yum metadata ends up with slightly wrong timestamps
101109#which inhibits its update
0 commit comments