Skip to content

Instantly share code, notes, and snippets.

@B-Galati
Last active February 24, 2022 22:30
Show Gist options
  • Save B-Galati/7cee5cffe6d5b93c8a53d3e9c5088d21 to your computer and use it in GitHub Desktop.
Save B-Galati/7cee5cffe6d5b93c8a53d3e9c5088d21 to your computer and use it in GitHub Desktop.
Dockerfile oracle oci8
FROM php:5.4-apache
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng12-dev \
libicu-dev \
libmysqlclient18 \
libc6 \
libaio1 \
zlib1g \
make \
php5-dev \
php-pear \
libcurl4-gnutls-dev \
unzip \
libcurl4-gnutls-dev \
libxml2-dev
RUN docker-php-ext-install intl pdo_mysql mbstring sockets soap calendar \
&& pecl install xdebug
ADD instantclient-basic-linux.x64-12.1.0.2.0.zip /tmp/
ADD instantclient-sdk-linux.x64-12.1.0.2.0.zip /tmp/
RUN unzip /tmp/instantclient-basic-linux.x64-12.1.0.2.0.zip -d /usr/local/ \
&& unzip /tmp/instantclient-sdk-linux.x64-12.1.0.2.0.zip -d /usr/local/ \
&& ln -s /usr/local/instantclient_12_1 /usr/local/instantclient \
&& ln -s /usr/local/instantclient/libclntsh.so.12.1 /usr/local/instantclient/libclntsh.so \
&& docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/local/instantclient \
&& docker-php-ext-install oci8
ADD php.ini $PHP_INI_DIR/conf.d/php.ini
ADD website.conf /etc/apache2/sites-available/website.conf
ADD libpdf_php.so /tmp/libpdf_php.so
RUN mv /tmp/libpdf_php.so $(php-config --extension-dir) \
&& find / -name "xdebug.so" -exec echo zend_extension={} > $PHP_INI_DIR/conf.d/ext-xdebug.ini \; \
&& echo "extension=libpdf_php.so" > $PHP_INI_DIR/conf.d/ext-libpdf.ini
RUN a2ensite website
RUN a2enmod rewrite
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment