Skip to content

Commit 3ad1cbb

Browse files
committed
Fix modules install
1 parent e1bdff7 commit 3ad1cbb

File tree

1 file changed

+22
-28
lines changed

1 file changed

+22
-28
lines changed

Dockerfile

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ COPY apache-run.sh /usr/bin/apache-run
1010
RUN chmod a+x /usr/bin/apache-run
1111

1212
# Install libs
13-
RUN apt-get update && apt-get install -y wget vim supervisor zip libfreetype6-dev libjpeg62-turbo-dev \
14-
libmcrypt-dev libpng-dev libssl-dev libaio1 git libcurl4-openssl-dev libxslt-dev \
15-
libldap2-dev libicu-dev libc-client-dev libkrb5-dev libsqlite3-dev libedit-dev
13+
RUN apt-get update && apt-get install -y wget supervisor libfreetype6-dev \
14+
libjpeg62-turbo-dev libpng-dev git libxslt-dev \
15+
libldap2-dev libicu-dev libc-client-dev libkrb5-dev
1616

1717
RUN a2enmod rewrite
1818

@@ -21,39 +21,33 @@ RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-di
2121
&& docker-php-ext-configure hash --with-mhash \
2222
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
2323
&& docker-php-ext-configure imap --with-kerberos --with-imap-ssl \
24-
&& docker-php-ext-install -j$(nproc) iconv bcmath mcrypt \
25-
gd pdo_mysql calendar curl exif ftp gettext \
26-
hash xsl ldap intl imap pdo_sqlite mbstring \
27-
mcrypt pcntl readline shmop soap sockets wddx zip
24+
&& docker-php-ext-install -j$(nproc) bcmath \
25+
gd pdo_mysql calendar exif gettext \
26+
xsl ldap intl imap \
27+
pcntl shmop soap sockets wddx
2828

2929
# Install ssh2
30-
RUN wget https://www.libssh2.org/download/libssh2-1.7.0.tar.gz && wget https://pecl.php.net/get/ssh2-1.1.2.tgz \
31-
&& tar vxzf libssh2-1.7.0.tar.gz && tar vxzf ssh2-1.1.2.tgz \
32-
&& cd libssh2-1.7.0 && ./configure \
30+
RUN wget https://www.libssh2.org/download/libssh2-1.8.0.tar.gz && wget https://pecl.php.net/get/ssh2-1.1.2.tgz \
31+
&& tar vxzf libssh2-1.8.0.tar.gz && tar vxzf ssh2-1.1.2.tgz \
32+
&& cd libssh2-1.8.0 && ./configure \
3333
&& make && make install \
3434
&& cd ../ssh2-1.1.2 && phpize && ./configure --with-ssh2 \
3535
&& make && make install \
3636
&& echo "extension=ssh2.so" >> /usr/local/etc/php/conf.d/ssh2.ini
3737

3838
# Install oci8
39-
RUN mkdir -p /opt/oci8 \
40-
&& cd /opt/oci8 \
41-
&& wget https://s3.amazonaws.com/simonetti-tests/oci8/instantclient-basic-linux.x64-12.1.0.2.0.zip \
42-
&& wget https://s3.amazonaws.com/simonetti-tests/oci8/instantclient-sdk-linux.x64-12.1.0.2.0.zip \
43-
&& unzip instantclient-sdk-linux.x64-12.1.0.2.0.zip \
44-
&& unzip instantclient-basic-linux.x64-12.1.0.2.0.zip \
45-
&& cd instantclient_12_1/ \
46-
&& ln -s libclntsh.so.12.1 libclntsh.so \
47-
&& ln -s libocci.so.12.1 libocci.so \
48-
&& cd /tmp \
49-
&& wget https://pecl.php.net/get/oci8-2.1.7.tgz \
50-
&& tar xzf oci8-2.1.7.tgz \
51-
&& cd oci8-2.1.7 \
52-
&& phpize \
53-
&& ./configure --with-oci8=shared,instantclient,/opt/oci8/instantclient_12_1/ \
54-
&& make \
55-
&& make install \
56-
&& echo "extension=/tmp/oci8-2.1.7/modules/oci8.so" >> /usr/local/etc/php/conf.d/oci8.ini
39+
RUN apt-get update && apt-get -y install wget bsdtar libaio1 && \
40+
wget -qO- https://raw.githubusercontent.com/caffeinalab/php-fpm-oci8/master/oracle/instantclient-basic-linux.x64-12.2.0.1.0.zip | bsdtar -xvf- -C /usr/local && \
41+
wget -qO- https://raw.githubusercontent.com/caffeinalab/php-fpm-oci8/master/oracle/instantclient-sdk-linux.x64-12.2.0.1.0.zip | bsdtar -xvf- -C /usr/local && \
42+
wget -qO- https://raw.githubusercontent.com/caffeinalab/php-fpm-oci8/master/oracle/instantclient-sqlplus-linux.x64-12.2.0.1.0.zip | bsdtar -xvf- -C /usr/local && \
43+
ln -s /usr/local/instantclient_12_2 /usr/local/instantclient && \
44+
ln -s /usr/local/instantclient/libclntsh.so.* /usr/local/instantclient/libclntsh.so && \
45+
ln -s /usr/local/instantclient/lib* /usr/lib && \
46+
ln -s /usr/local/instantclient/sqlplus /usr/bin/sqlplus && \
47+
docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/local/instantclient && \
48+
docker-php-ext-install oci8 && \
49+
rm -rf /var/lib/apt/lists/* && \
50+
php -v
5751

5852
# Install redis
5953
RUN pecl install redis \

0 commit comments

Comments
 (0)