33 lines
1.1 KiB
Docker
33 lines
1.1 KiB
Docker
# NAME leenooks/php
|
|
# VERSION 8.0-fpm-db2
|
|
|
|
FROM registry.leenooks.net/leenooks/php:8.0-fpm-latest
|
|
|
|
# Install DB2
|
|
RUN apt-get update && apt-get install -y ksh \
|
|
&& apt-get clean \
|
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
RUN mkdir /opt/ibm && cd /opt/ibm \
|
|
&& curl -L https://yum.leenooks.net/docker/src/db2/v11.5.6_linuxx64_dsdriver.tar.gz | tar xzf - \
|
|
&& /opt/ibm/dsdriver/installDSDriver \
|
|
&& echo /opt/ibm/dsdriver/|pecl install ibm_db2 \
|
|
&& docker-php-ext-enable ibm_db2 \
|
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
# Install PDO IBM
|
|
RUN mkdir -p /home/db2inst1 && ln -s /opt/ibm/dsdriver /home/db2inst1/sqllib \
|
|
&& cd /tmp \
|
|
&& curl -L http://pecl.php.net/get/PDO_IBM-1.4.1.tgz | tar xzf - \
|
|
&& cd PDO_IBM-1.4.1 \
|
|
&& phpize && mkdir -p include/php/ext/pdo && cp *.h include/php/ext/pdo \
|
|
&& ln -s lib /home/db2inst1/sqllib/lib64 \
|
|
&& ./configure --with-pdo-ibm=/home/db2inst1/sqllib \
|
|
&& make install \
|
|
&& docker-php-ext-enable pdo_ibm \
|
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
### Install PDO ODBC
|
|
#RUN docker-php-ext-configure pdo_odbc --with-pdo-odbc=ibm-db2 \
|
|
# && docker-php-ext-install pdo_odbc
|