1
1
FROM quay.io/pypa/manylinux1_i686:latest
2
2
3
3
RUN 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
12
18
13
19
ENV QTDIR /opt/Qt4.8.7
14
20
ENV PATH "$QTDIR/bin:$PATH"
15
21
16
22
RUN 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*
28
36
29
37
# https://trac.ffmpeg.org/wiki/CompilationGuide/Centos#GettheDependencies
30
38
# manylinux provides the toolchain and git; we provide cmake
@@ -33,69 +41,69 @@ RUN yum install freetype-devel bzip2-devel zlib-devel -y && \
33
41
34
42
# Newer openssl configure requires newer perl
35
43
RUN 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*
44
52
45
53
RUN 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 && \
55
63
rm -rf ~/openssl_build
56
64
57
65
RUN 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
63
71
64
72
RUN 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
71
79
72
80
RUN 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
78
86
79
87
RUN 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
90
98
91
99
ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig:/root/ffmpeg_build/lib/pkgconfig
92
100
ENV LDFLAGS -L/root/ffmpeg_build/lib
93
101
94
102
RUN 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
99
107
100
108
#in i686, yum metadata ends up with slightly wrong timestamps
101
109
#which inhibits its update
0 commit comments