Commit 9b47e55e authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Ajout possibilité de builder en PHP 5.6 (nouveau build-arg OCI8_PACKAGE nécessaire)

parent 7b889325
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ LABEL maintainer="Bertrand GAUTHIER <bertrand.gauthier at unicaen.fr>"

ARG PHP_VERSION
ARG HTTP_PROXY
ARG OCI8_PACKAGE

ENV PHP_VERSION=${PHP_VERSION} \
    APACHE_CONF_DIR=/etc/apache2 \
@@ -94,7 +95,7 @@ RUN unzip -o /tmp/instantclient-basiclite-linux.x64-12.2.0.1.0.zip -d /usr/local
    ln -s /usr/local/instantclient_12_2 /usr/local/instantclient && \
    ln -s /usr/local/instantclient/libclntsh.so.12.1 /usr/local/instantclient/libclntsh.so && \
    ln -s /usr/local/instantclient/sqlplus /usr/bin/sqlplus && \
    echo 'instantclient,/usr/local/instantclient' | pecl install oci8 && \
    echo 'instantclient,/usr/local/instantclient' | pecl install ${OCI8_PACKAGE} && \
    echo "extension=oci8.so" > ${PHP_CONF_DIR}/fpm/conf.d/30-php-oci8.ini && \
    echo "extension=oci8.so" > ${PHP_CONF_DIR}/cli/conf.d/30-php-oci8.ini && \
    echo "/usr/local/instantclient" > /etc/ld.so.conf.d/oracle-instantclient.conf && ldconfig
+19 −0
Original line number Diff line number Diff line
@@ -14,6 +14,21 @@ cd unicaen-image

Construisez l'image pour la version de PHP désirée, pour l'ajouter au registre des images Docker... 

### PHP 5.6

```bash
HTTP_PROXY=http://proxy.unicaen.fr:3128 ; \
PHP_VERSION=5.6 ; \
docker build \
--rm \
--build-arg PHP_VERSION=${PHP_VERSION} \
--build-arg HTTP_PROXY=${HTTP_PROXY} \
--build-arg OCI8_PACKAGE="oci8-2.0.12" \
-f Dockerfile \
-t unicaen-dev-php${PHP_VERSION}-apache \
.
```

### PHP 7.0

```bash
@@ -24,6 +39,7 @@ docker build \
--rm \
--build-arg PHP_VERSION=${PHP_VERSION} \
--build-arg HTTP_PROXY=${HTTP_PROXY} \
--build-arg OCI8_PACKAGE="oci8" \
-f Dockerfile \
-t unicaen-dev-php${PHP_VERSION}-apache \
.
@@ -39,6 +55,7 @@ docker build \
--rm \
--build-arg PHP_VERSION=${PHP_VERSION} \
--build-arg HTTP_PROXY=${HTTP_PROXY} \
--build-arg OCI8_PACKAGE="oci8" \
-f Dockerfile \
-t unicaen-dev-php${PHP_VERSION}-apache \
.
@@ -54,6 +71,7 @@ docker build \
--rm \
--build-arg PHP_VERSION=${PHP_VERSION} \
--build-arg HTTP_PROXY=${HTTP_PROXY} \
--build-arg OCI8_PACKAGE="oci8" \
-f Dockerfile \
-t unicaen-dev-php${PHP_VERSION}-apache \
.
@@ -69,6 +87,7 @@ docker build \
--rm \
--build-arg PHP_VERSION=${PHP_VERSION} \
--build-arg HTTP_PROXY=${HTTP_PROXY} \
--build-arg OCI8_PACKAGE="oci8" \
-f Dockerfile \
-t unicaen-dev-php${PHP_VERSION}-apache \
.