Skip to content

Instantly share code, notes, and snippets.



Created Jun 28, 2017
What would you like to do?
FROM php:7-apache
MAINTAINER Fahim Shariar <>
# installing required stuff
RUN apt-get update \
&& apt-get install -y unzip libaio-dev libmcrypt-dev git \
&& apt-get clean -y
# PHP extensions
docker-php-ext-configure pdo_mysql --with-pdo-mysql=mysqlnd \
&& docker-php-ext-configure mysqli --with-mysqli=mysqlnd \
&& docker-php-ext-install pdo_mysql \
&& docker-php-ext-install mbstring \
&& docker-php-ext-install mcrypt
# xdebug, if you want to debug
RUN pecl install xdebug
# PHP composer
RUN curl -sS | 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/ /tmp/
ADD oracle/ /tmp/
ADD oracle/ /tmp/
# unzip them
RUN unzip /tmp/ -d /usr/local/ \
&& unzip /tmp/ -d /usr/local/ \
&& unzip /tmp/ -d /usr/local/
# install pecl
RUN curl -O \
; /usr/local/bin/php -d detect_unicode=0 go-pear.phar
# install oci8
RUN ln -s /usr/local/instantclient_12_1 /usr/local/instantclient \
&& ln -s /usr/local/instantclient/ /usr/local/instantclient/ \
&& ln -s /usr/local/instantclient/sqlplus /usr/bin/sqlplus \
&& echo 'instantclient,/usr/local/instantclient' | pecl install oci8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.