Skip to content

Commit 90291f6

Browse files
committed
php 7.0 docker file
1 parent 982c7a3 commit 90291f6

File tree

1 file changed

+18
-0
lines changed
  • docker/ubuntu-20.10_php-7.0_opencv-4.0.1

1 file changed

+18
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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.0 php7.0-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.0/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.0-4.0.1" --pkglicense "Apache 2.0" --pakdir ~ --maintainer "php-opencv" --addso --autodoinst make install

0 commit comments

Comments
 (0)