Skip to content

Instantly share code, notes, and snippets.

@gwmoura
Last active October 26, 2016 13:25
Show Gist options
  • Save gwmoura/937ed4b690842da0fc668ea8fc850199 to your computer and use it in GitHub Desktop.
Save gwmoura/937ed4b690842da0fc668ea8fc850199 to your computer and use it in GitHub Desktop.
Dockerfiel for Laravel Composer and OCI ext
FROM php:7
ENV LAST_UPDATE 20161003
RUN curl https://getcomposer.org/installer | php
RUN mv composer.phar /usr/bin/composer
RUN apt-get update
RUN apt-get install -y libmcrypt-dev \
git \
zlib1g-dev \
wget \
alien \
libaio1
WORKDIR /tmp
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 oci8\
pdo \
pdo_oci \
pcntl \
mcrypt \
mbstring \
tokenizer \
zip
ENV DIR=/var/www/html/
RUN mkdir -p $DIR
WORKDIR $DIR
ADD . $DIR
RUN composer install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment