-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathDockerfile
49 lines (38 loc) · 1.9 KB
/
Dockerfile
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
FROM php:8-apache
MAINTAINER Amin Mkh <[email protected]>
# installing required stuff
RUN apt-get update \
&& apt-get install -y unzip libaio-dev libmcrypt-dev git \
&& apt-get clean -y
# PHP extensions
RUN \
docker-php-ext-configure pdo_mysql --with-pdo-mysql=mysqlnd \
&& docker-php-ext-configure mysqli \
&& docker-php-ext-install pdo_mysql
# && docker-php-ext-install mcrypt
# xdebug, if you want to debug
RUN pecl install xdebug \
&& docker-php-ext-enable xdebug
# PHP composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer
# apache configurations, mod rewrite
RUN ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load
# Oracle instantclient
# copy oracle files
# ADD oracle/instantclient-basic-linux.x64-12.1.0.2.0.zip /tmp/
ADD https://download.oracle.com/otn_software/linux/instantclient/211000/instantclient-basic-linux.x64-21.1.0.0.0.zip /tmp/
# ADD oracle/instantclient-sdk-linux.x64-12.1.0.2.0.zip /tmp/
ADD https://download.oracle.com/otn_software/linux/instantclient/211000/instantclient-sdk-linux.x64-21.1.0.0.0.zip /tmp/
# ADD oracle/instantclient-sqlplus-linux.x64-12.1.0.2.0.zip /tmp/
ADD https://download.oracle.com/otn_software/linux/instantclient/211000/instantclient-sqlplus-linux.x64-21.1.0.0.0.zip /tmp/
# unzip them
RUN unzip /tmp/instantclient-basic-linux.x64-*.zip -d /usr/local/ \
&& unzip /tmp/instantclient-sdk-linux.x64-*.zip -d /usr/local/ \
&& unzip /tmp/instantclient-sqlplus-linux.x64-*.zip -d /usr/local/
# install oci8
RUN ln -s /usr/local/instantclient_*_1 /usr/local/instantclient \
&& ln -s /usr/local/instantclient/sqlplus /usr/bin/sqlplus
RUN docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/local/instantclient \
&& docker-php-ext-install oci8 \
&& echo /usr/local/instantclient/ > /etc/ld.so.conf.d/oracle-insantclient.conf \
&& ldconfig