File tree 1 file changed +18
-0
lines changed
docker/ubuntu-20.10_php-7.2_opencv-4.0.1
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change
1
+ FROM ubuntu:20.10
2
+
3
+ RUN apt update && apt install -y wget pkg-config cmake git checkinstall
4
+
5
+ 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
6
+
7
+ RUN apt install -y software-properties-common && add-apt-repository ppa:ondrej/php && apt update && export DEBIAN_FRONTEND=noninteractive && apt install -y php7.2 php7.2-dev
8
+
9
+ RUN git clone https://github.com/php-opencv/php-opencv.git
10
+ RUN cd php-opencv && git checkout php7.2
11
+
12
+ RUN cd php-opencv && phpize && ./configure --with-php-config=/usr/bin/php-config && make && make install
13
+
14
+ RUN echo "extension=opencv.so" > /etc/php/7.2/cli/conf.d/opencv.ini
15
+
16
+ # build deb package:
17
+
18
+ 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