forked from SEMGE-BA/oracle-php7
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
66 lines (54 loc) · 2.71 KB
/
Dockerfile
File metadata and controls
66 lines (54 loc) · 2.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
FROM php:7
RUN apt-get update
RUN apt-get install -y git \
wget \
alien \
libaio1 \
apt-transport-https \
curl \
libmcrypt-dev \
zlib1g-dev \
libxslt-dev
WORKDIR /tmp
# Install Composer
RUN curl https://getcomposer.org/installer | php
RUN mv composer.phar /usr/bin/composer
# Instaling and configuring oracle client
ADD ./oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm /tmp/oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm
ADD ./oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm /tmp/oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm
RUN alien -i oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm
RUN alien -i oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm
ENV LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib/${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
RUN echo "/usr/lib/oracle/12.1/client64/lib/" > /etc/ld.so.conf.d/oracle.conf && chmod o+r /etc/ld.so.conf.d/oracle.conf
ENV ORACLE_HOME=/usr/lib/oracle/12.1/client64
ENV C_INCLUDE_PATH=/usr/include/oracle/12.1/client64/
RUN ls -al /usr/include/oracle/12.1/client*/*
RUN ls -al $ORACLE_HOME/lib
RUN ln -s /usr/include/oracle/12.1/client64 $ORACLE_HOME/include
RUN docker-php-ext-install -j$(nproc) oci8 \
pdo \
pdo_oci \
pcntl \
mcrypt \
mbstring \
tokenizer \
zip \
mysqli \
pdo_mysql \
xsl
ENV XDEBUGINI_PATH=/usr/local/etc/php/conf.d/xdebug.ini
RUN yes | pecl install xdebug
RUN echo "zend_extension="`find /usr/local/lib/php/extensions/ -iname 'xdebug.so'` > $XDEBUGINI_PATH \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" >> $XDEBUGINI_PATH \
&& echo "xdebug.remote_enable=on" >> $XDEBUGINI_PATH \
&& echo "xdebug.remote_autostart=on" >> $XDEBUGINI_PATH \
&& echo "xdebug.remote_connect_back=off" >> $XDEBUGINI_PATH \
&& echo "xdebug.remote_handler=dbgp" >> $XDEBUGINI_PATH \
&& echo "xdebug.profiler_enable=0" >> $XDEBUGINI_PATH \
&& echo "xdebug.profiler_output_dir=\"/var/www/html\"" >> $XDEBUGINI_PATH \
&& echo "xdebug.remote_port=9000" >> $XDEBUGINI_PATH
RUN echo "xdebug.remote_host="`/sbin/ip route|awk '/default/ { print $3 }'` >> $XDEBUGINI_PATH
ENV DIR=/var/www/html/
RUN mkdir -p $DIR
WORKDIR $DIR
ADD . $DIR