File tree 2 files changed +41
-0
lines changed
ubuntu-18.04_opencv-4.0.1
ubuntu-18.04_php-7.2_opencv-4.0.1
2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ FROM ubuntu:18.04
2
+
3
+ RUN apt update && apt install -y wget pkg-config cmake git checkinstall
4
+
5
+ RUN echo 1
6
+
7
+ RUN git clone https://github.com/opencv/opencv_contrib.git && git clone https://github.com/opencv/opencv.git
8
+
9
+ RUN cd opencv_contrib && git checkout tags/4.0.1 && cd ../opencv && git checkout tags/4.0.1
10
+
11
+ RUN mkdir build && cd build && cmake -D OPENCV_GENERATE_PKGCONFIG=YES -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules ../opencv
12
+
13
+ RUN cd build && make -j4
14
+
15
+ RUN ldconfig
16
+
17
+ # build deb package:
18
+
19
+ RUN cd build && checkinstall --default --type debian --install=no --pkgname opencv --pkgversion "4.0.1" --pkglicense "3-clause BSD License" --pakdir ~ --maintainer "php-opencv" --addso --autodoinst make install
Original file line number Diff line number Diff line change
1
+ FROM ubuntu:18.04
2
+
3
+ RUN apt update && export DEBIAN_FRONTEND=noninteractive && apt install -y php-cli wget pkg-config cmake git php-cli php-dev checkinstall
4
+
5
+ RUN echo 1
6
+
7
+ RUN wget https://raw.githubusercontent.com/php-opencv/php-opencv-packages/master/opencv_4.0.1_amd64.deb && dpkg -i opencv_4.0.1_amd64.deb && rm opencv_4.0.1_amd64.deb
8
+ # COPY opencv_4.0.1_amd64.deb opencv_4.0.1_amd64.deb
9
+ # RUN dpkg -i opencv_4.0.1_amd64.deb && rm opencv_4.0.1_amd64.deb
10
+
11
+ RUN git clone https://github.com/php-opencv/php-opencv.git
12
+ # COPY php-opencv /php-opencv
13
+
14
+ # RUN ldconfig
15
+
16
+ RUN cd php-opencv && phpize && ./configure --with-php-config=/usr/bin/php-config && make && make install && make test
17
+
18
+ RUN echo "extension=opencv.so" > /etc/php/7.2/cli/conf.d/opencv.ini
19
+
20
+ # build deb package:
21
+
22
+ RUN cd php-opencv && checkinstall --default --type debian --install=no --pkgname php-opencv --pkgversion "7.2-4.0.1" --pkglicense "Apache 2.0" --pakdir ~ --maintainer "php-opencv" --addso --autodoinst make install
You can’t perform that action at this time.
0 commit comments