Skip to content

Commit 2935b01

Browse files
committed
centos
1 parent d2b2209 commit 2935b01

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

Diff for: docker/centos-7_opencv-3.4/Dockerfile

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM centos:7.5.1804
2+
3+
RUN yum install -y epel-release
4+
5+
RUN yum install -y wget git make cmake gcc gcc-c++ rpm-build rpmdevtools
6+
7+
RUN git clone https://github.com/opencv/opencv_contrib.git && git clone https://github.com/opencv/opencv.git
8+
9+
#COPY opencv_contrib /opencv_contrib
10+
#COPY opencv /opencv
11+
12+
RUN cd opencv_contrib && git checkout 3.4 && cd ../opencv && git checkout 3.4
13+
14+
RUN mkdir build && cd build && cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules ../opencv && make -j4 && make install
15+
16+
RUN echo "/usr/local/lib64" > /etc/ld.so.conf.d/opencv.conf && ldconfig
17+
18+
#save /usr/local
19+
#todo: rpm-build

Diff for: docker/centos-7_php-7.0/Dockerfile

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
FROM centos:7.5.1804
2+
3+
RUN yum install -y epel-release
4+
5+
RUN yum install -y wget git make cmake gcc gcc-c++ rpm-build rpmdevtools
6+
7+
RUN yum -y install centos-release-scl && yum makecache && yum -y install devtoolset-7-gcc devtoolset-7-gcc-c++ && scl enable devtoolset-7 bash
8+
9+
RUN yum install -y epel-release http://rpms.remirepo.net/enterprise/remi-release-7.rpm
10+
#RUN yum install -y
11+
RUN yum-config-manager --enable remi-php70
12+
13+
RUN yum install -y php-cli php-devel phpconfig
14+
15+
ENV HOME=/opt/app-root/src PATH=/opt/app-root/src/bin:/opt/app-root/bin:/opt/rh/devtoolset-7/root/usr/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
16+
ENV BASH_ENV=/opt/app-root/etc/scl_enable ENV=/opt/app-root/etc/scl_enable PROMPT_COMMAND=". /opt/app-root/etc/scl_enable"
17+
18+
COPY usr/local /usr/local
19+
20+
RUN git clone https://github.com/php-opencv/php-opencv.git
21+
#COPY php-opencv /php-opencv
22+
23+
RUN cd php-opencv && export PKG_CONFIG=/usr/bin/pkg-config && export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig && phpize && ./configure --with-php-config=/usr/bin/php-config && make && make install && make test
24+
25+
RUN echo "extension=opencv.so" > /etc/php.d/opencv.ini
26+
27+
#todo: rpm-build

0 commit comments

Comments
 (0)