Skip to content

Commit 800ca9f

Browse files
committed
First commit
0 parents  commit 800ca9f

File tree

2 files changed

+94
-0
lines changed

2 files changed

+94
-0
lines changed

Dockerfile

+93
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
FROM php:7.1-fpm
2+
3+
# Get repository and install wget and vim
4+
RUN apt-get update && apt-get install -y \
5+
wget \
6+
vim \
7+
git \
8+
unzip \
9+
apt-utils \
10+
software-properties-common \
11+
python-software-properties \
12+
apt-transport-https
13+
14+
RUN echo "--> Installing Yarn and NodeJS" && \
15+
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
16+
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
17+
curl -sL https://deb.nodesource.com/setup_9.x | bash - && \
18+
apt-get install --no-install-recommends -y nodejs yarn
19+
20+
# Install Oracle Instantclient
21+
RUN mkdir /opt/oracle \
22+
&& cd /opt/oracle \
23+
&& wget https://github.com/bumpx/oracle-instantclient/raw/master/instantclient-basic-linux.x64-12.2.0.1.0.zip \
24+
&& wget https://github.com/bumpx/oracle-instantclient/raw/master/instantclient-sdk-linux.x64-12.2.0.1.0.zip \
25+
&& unzip /opt/oracle/instantclient-basic-linux.x64-12.2.0.1.0.zip -d /opt/oracle \
26+
&& unzip /opt/oracle/instantclient-sdk-linux.x64-12.2.0.1.0.zip -d /opt/oracle \
27+
&& ln -s /opt/oracle/instantclient_12_2/libclntsh.so.12.1 /opt/oracle/instantclient_12_2/libclntsh.so \
28+
&& ln -s /opt/oracle/instantclient_12_2/libclntshcore.so.12.1 /opt/oracle/instantclient_12_2/libclntshcore.so \
29+
&& ln -s /opt/oracle/instantclient_12_2/libocci.so.12.1 /opt/oracle/instantclient_12_2/libocci.so \
30+
&& rm -rf /opt/oracle/*.zip
31+
32+
# Install PHP extensions deps
33+
RUN apt-get update \
34+
&& apt-get install --no-install-recommends -y \
35+
libfreetype6-dev \
36+
libjpeg62-turbo-dev \
37+
libmcrypt-dev \
38+
libpng12-dev \
39+
zlib1g-dev \
40+
libicu-dev \
41+
g++ \
42+
unixodbc-dev \
43+
libxml2-dev \
44+
libaio-dev \
45+
libmemcached-dev \
46+
freetds-dev \
47+
libssl-dev \
48+
openssl
49+
50+
# Install Composer
51+
RUN curl -sS https://getcomposer.org/installer | php -- \
52+
--install-dir=/usr/local/bin \
53+
--filename=composer
54+
55+
# Install PHP extensions
56+
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
57+
&& echo 'instantclient,/opt/oracle/instantclient_12_2' | pecl install oci8 \
58+
&& docker-php-ext-configure pdo_oci --with-pdo-oci=instantclient,/opt/oracle/instantclient_12_2,12.2
59+
RUN pecl install sqlsrv \
60+
&& pecl install pdo_sqlsrv \
61+
&& pecl install redis \
62+
&& pecl install memcached \
63+
&& pecl install apcu \
64+
&& pecl install apcu_bc-1.0.3
65+
66+
RUN docker-php-ext-install \
67+
iconv \
68+
mbstring \
69+
intl \
70+
mcrypt \
71+
gd \
72+
pdo_oci \
73+
soap \
74+
sockets \
75+
zip \
76+
pcntl \
77+
ftp \
78+
&& docker-php-ext-enable \
79+
oci8 \
80+
sqlsrv \
81+
pdo_sqlsrv \
82+
redis \
83+
memcached \
84+
opcache \
85+
apcu --ini-name 10-docker-php-ext-apcu.ini \
86+
apc --ini-name 20-docker-php-ext-apc.ini
87+
88+
# Clean repository
89+
RUN apt-get autoremove -y && \
90+
apt-get clean && \
91+
rm -rf /var/lib/apt/lists/*
92+
93+
EXPOSE 9000

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# PHP-SQLSRV-ORACLE

0 commit comments

Comments
 (0)