Commit 781a8f3f authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Merge branch 'master' of https://git.unicaen.fr/open-source/docker/unicaen-image into buster

 Conflicts:
	Dockerfile-5.x
parents e21a4256 d161696a
Loading
Loading
Loading
Loading
Loading
+26 −14
Original line number Diff line number Diff line
@@ -7,59 +7,71 @@ stages:
build5.6:
  stage: build
  script:
    - export HTTP_PROXY=http://proxy.unicaen.fr:3128
    - export HTTP_PROXY=http://10.14.128.99:3128
    - export 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" -t unicaen-dev-php${PHP_VERSION}-apache .
    - docker build --rm --build-arg PHP_VERSION=${PHP_VERSION} --build-arg HTTP_PROXY=${HTTP_PROXY} -f Dockerfile-5.x -t unicaen-dev-php${PHP_VERSION}-apache .
    - docker tag unicaen-dev-php${PHP_VERSION}-apache registre.unicaen.fr:5000/unicaen-dev-php${PHP_VERSION}-apache
    - docker push registre.unicaen.fr:5000/unicaen-dev-php${PHP_VERSION}-apache

build7.0:
  stage: build
  script:
    - export HTTP_PROXY=http://proxy.unicaen.fr:3128
    - export HTTP_PROXY=http://10.14.128.99:3128
    - export PHP_VERSION=7.0
    - docker build --rm --build-arg PHP_VERSION=${PHP_VERSION} --build-arg HTTP_PROXY=${HTTP_PROXY} -t unicaen-dev-php${PHP_VERSION}-apache .
    - docker build --rm --build-arg PHP_VERSION=${PHP_VERSION} --build-arg HTTP_PROXY=${HTTP_PROXY} -f Dockerfile-7.x -t unicaen-dev-php${PHP_VERSION}-apache .
    - docker tag unicaen-dev-php${PHP_VERSION}-apache registre.unicaen.fr:5000/unicaen-dev-php${PHP_VERSION}-apache
    - docker push registre.unicaen.fr:5000/unicaen-dev-php${PHP_VERSION}-apache

build7.1:
  stage: build
  script:
    - export HTTP_PROXY=http://proxy.unicaen.fr:3128
    - export HTTP_PROXY=http://10.14.128.99:3128
    - export PHP_VERSION=7.1
    - docker build --rm --build-arg PHP_VERSION=${PHP_VERSION} --build-arg HTTP_PROXY=${HTTP_PROXY} -t unicaen-dev-php${PHP_VERSION}-apache .
    - docker build --rm --build-arg PHP_VERSION=${PHP_VERSION} --build-arg HTTP_PROXY=${HTTP_PROXY} -f Dockerfile-7.x -t unicaen-dev-php${PHP_VERSION}-apache .
    - docker tag unicaen-dev-php${PHP_VERSION}-apache registre.unicaen.fr:5000/unicaen-dev-php${PHP_VERSION}-apache
    - docker push registre.unicaen.fr:5000/unicaen-dev-php${PHP_VERSION}-apache

build7.2:
  stage: build
  script:
    - export HTTP_PROXY=http://proxy.unicaen.fr:3128
    - export HTTP_PROXY=http://10.14.128.99:3128
    - export PHP_VERSION=7.2
    - docker build --rm --build-arg PHP_VERSION=${PHP_VERSION} --build-arg HTTP_PROXY=${HTTP_PROXY} -t unicaen-dev-php${PHP_VERSION}-apache .
    - docker build --rm --build-arg PHP_VERSION=${PHP_VERSION} --build-arg HTTP_PROXY=${HTTP_PROXY} -f Dockerfile-7.x -t unicaen-dev-php${PHP_VERSION}-apache .
    - docker tag unicaen-dev-php${PHP_VERSION}-apache registre.unicaen.fr:5000/unicaen-dev-php${PHP_VERSION}-apache
    - docker push registre.unicaen.fr:5000/unicaen-dev-php${PHP_VERSION}-apache

build7.3:
  stage: build
  script:
    - export HTTP_PROXY=http://proxy.unicaen.fr:3128
    - export HTTP_PROXY=http://10.14.128.99:3128
    - export PHP_VERSION=7.3
    - docker build --rm --build-arg PHP_VERSION=${PHP_VERSION} --build-arg HTTP_PROXY=${HTTP_PROXY} -t unicaen-dev-php${PHP_VERSION}-apache .
    - docker build --rm --build-arg PHP_VERSION=${PHP_VERSION} --build-arg HTTP_PROXY=${HTTP_PROXY} -f Dockerfile-7.x -t unicaen-dev-php${PHP_VERSION}-apache .
    - docker tag unicaen-dev-php${PHP_VERSION}-apache registre.unicaen.fr:5000/unicaen-dev-php${PHP_VERSION}-apache
    - docker push registre.unicaen.fr:5000/unicaen-dev-php${PHP_VERSION}-apache
    - docker build --rm --build-arg PHP_VERSION=${PHP_VERSION} --build-arg HTTP_PROXY=${HTTP_PROXY} -t open-source/docker/unicaen-image:php${PHP_VERSION} .
    - docker build --rm --build-arg PHP_VERSION=${PHP_VERSION} --build-arg HTTP_PROXY=${HTTP_PROXY} -f Dockerfile-7.x -t open-source/docker/unicaen-image:php${PHP_VERSION} .
    - docker tag open-source/docker/unicaen-image:php${PHP_VERSION} registre.unicaen.fr:5000/open-source/docker/unicaen-image:php${PHP_VERSION}
    - docker push registre.unicaen.fr:5000/open-source/docker/unicaen-image:php${PHP_VERSION}

build7.4:
  stage: build
  script:
    - export HTTP_PROXY=http://proxy.unicaen.fr:3128
    - export HTTP_PROXY=http://10.14.128.99:3128
    - export PHP_VERSION=7.4
    - docker build --rm --build-arg PHP_VERSION=${PHP_VERSION} --build-arg HTTP_PROXY=${HTTP_PROXY} -t unicaen-dev-php${PHP_VERSION}-apache .
    - docker build --rm --build-arg PHP_VERSION=${PHP_VERSION} --build-arg HTTP_PROXY=${HTTP_PROXY} -f Dockerfile-7.x -t unicaen-dev-php${PHP_VERSION}-apache .
    - docker tag unicaen-dev-php${PHP_VERSION}-apache registre.unicaen.fr:5000/unicaen-dev-php${PHP_VERSION}-apache
    - docker push registre.unicaen.fr:5000/unicaen-dev-php${PHP_VERSION}-apache
    - docker build --rm --build-arg PHP_VERSION=${PHP_VERSION} --build-arg HTTP_PROXY=${HTTP_PROXY} -t open-source/docker/unicaen-image:php${PHP_VERSION} .
    - docker build --rm --build-arg PHP_VERSION=${PHP_VERSION} --build-arg HTTP_PROXY=${HTTP_PROXY} -f Dockerfile-7.x -t open-source/docker/unicaen-image:php${PHP_VERSION} .
    - docker tag open-source/docker/unicaen-image:php${PHP_VERSION} registre.unicaen.fr:5000/open-source/docker/unicaen-image:php${PHP_VERSION}
    - docker push registre.unicaen.fr:5000/open-source/docker/unicaen-image:php${PHP_VERSION}

build8.0:
  stage: build
  script:
    - export HTTP_PROXY=http://10.14.128.99:3128
    - export PHP_VERSION=8.0
    - docker build --rm --build-arg PHP_VERSION=${PHP_VERSION} --build-arg HTTP_PROXY=${HTTP_PROXY} -f Dockerfile-8.x -t unicaen-dev-php${PHP_VERSION}-apache .
    - docker tag unicaen-dev-php${PHP_VERSION}-apache registre.unicaen.fr:5000/unicaen-dev-php${PHP_VERSION}-apache
    - docker push registre.unicaen.fr:5000/unicaen-dev-php${PHP_VERSION}-apache
    - docker build --rm --build-arg PHP_VERSION=${PHP_VERSION} --build-arg HTTP_PROXY=${HTTP_PROXY} -f Dockerfile-8.x -t open-source/docker/unicaen-image:php${PHP_VERSION} .
    - docker tag open-source/docker/unicaen-image:php${PHP_VERSION} registre.unicaen.fr:5000/open-source/docker/unicaen-image:php${PHP_VERSION}
    - docker push registre.unicaen.fr:5000/open-source/docker/unicaen-image:php${PHP_VERSION}

CHANGELOG.md

0 → 100644
+14 −0
Original line number Diff line number Diff line
# CHANGELOG

## 1.1.1

- Réorganisation des configs PHP par version car la config de xdebug v2 (PHP 5.x) n'est pas pareille à celle de la v3 (PHP 7.x, 8.x).

## 1.1.0

- Correction des Dockerfile pour forcer l'install de composer v1 (car la v2 génère des problèmes).
- Correction de la conf PHP pour xdebug v3.

## 1.0.0

- Un Dockerfile par version majeure de PHP car les versions du driver Oracle OCI8 et Instant Client diffèrent.
+42 −26
Original line number Diff line number Diff line
@@ -4,33 +4,46 @@
#
###########################################################################################

FROM debian:buster
#FROM localhost:5000/stretch
#
# NB: Derrière un proxy, transmission nécessaire des variables d'env `http_*` via `--build-arg` :
#   --build-arg http_proxy
#   --build-arg https_proxy
#   --build-arg no_proxy
#

FROM debian:buster as distrib

LABEL maintainer="Bertrand GAUTHIER <bertrand.gauthier at unicaen.fr>"

# Variables d'ENVironnement nécessaires au build
ARG PHP_VERSION
ARG HTTP_PROXY
ARG OCI8_PACKAGE

ENV PHP_VERSION=${PHP_VERSION} \
    OCI8_PACKAGE="oci8-2.0.12" \
    APACHE_CONF_DIR=/etc/apache2 \
    PHP_CONF_DIR=/etc/php/${PHP_VERSION} \
    HTTP_PROXY=${HTTP_PROXY} \
    HTTPS_PROXY=${HTTP_PROXY}
    PHP_CONF_DIR=/etc/php/${PHP_VERSION}

ENV HTTP_PROXY=${http_proxy} \
    HTTPS_PROXY=${https_proxy} \
    NO_PROXY=${no_proxy} \
    http_proxy=${http_proxy} \
    https_proxy=${https_proxy} \
    no_proxy=${no_proxy}

ENV APACHE_CONF_LOCAL_DIR=configs/apache \
    PHP_CONF_LOCAL_DIR=configs/php/5.x

# Mise à niveau de la distrib
RUN echo "Acquire::http::proxy \"${HTTP_PROXY}\";" > /etc/apt/apt.conf.d/proxy
RUN apt-get -qq update

# PHP 7.x PPA repository
# Repositories fournissant PHP 5.x, 7.x et 8.x
RUN apt-get install -y wget lsb-release apt-transport-https ca-certificates && \
    echo "http_proxy = ${HTTP_PROXY}"  >> /etc/wgetrc && \
    echo "https_proxy = ${HTTP_PROXY}" >> /etc/wgetrc && \
    wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg && \
    echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/php.list

# Installation des packages requis.

FROM distrib as install

# Installation des packages communs
RUN apt-get -qq update && \
    apt-get install -y \
        apache2 \
@@ -75,6 +88,11 @@ RUN apt-get -qq update && \
        php${PHP_VERSION}-xdebug \
        php${PHP_VERSION}-xml \
        php${PHP_VERSION}-zip \
        php${PHP_VERSION}-cli \
        php${PHP_VERSION}-common \
        php${PHP_VERSION}-json \
        php${PHP_VERSION}-opcache \
        php${PHP_VERSION}-readline \
        ssh \
        ssl-cert \
        subversion \
@@ -83,12 +101,15 @@ RUN apt-get -qq update && \
        wget \
        zlib1g-dev

# Config PHP.
ADD configs/php.conf ${PHP_CONF_DIR}/fpm/conf.d/20-php-unicaen.ini
ADD configs/php-opcache.ini ${PHP_CONF_DIR}/fpm/conf.d/20-opcache-unicaen.ini
# Forçage de la version de PHP CLI
RUN update-alternatives --set php /usr/bin/php${PHP_VERSION}

# Config PHP
ADD ${PHP_CONF_LOCAL_DIR}/opcache.ini ${PHP_CONF_DIR}/fpm/conf.d/90-opcache.ini
ADD ${PHP_CONF_LOCAL_DIR}/php.conf    ${PHP_CONF_DIR}/fpm/conf.d/91-unicaen.ini
ADD ${PHP_CONF_LOCAL_DIR}/xdebug.conf ${PHP_CONF_DIR}/fpm/conf.d/92-xdebug.ini

# Package PHP Oracle OCI8
RUN pear config-set http_proxy ${HTTP_PROXY}
ADD resources/instantclient-basiclite-linux.x64-12.2.0.1.0.zip /tmp/
ADD resources/instantclient-sdk-linux.x64-12.2.0.1.0.zip /tmp/
ADD resources/instantclient-sqlplus-linux.x64-12.2.0.1.0.zip /tmp/
@@ -103,20 +124,15 @@ RUN unzip -o /tmp/instantclient-basiclite-linux.x64-12.2.0.1.0.zip -d /usr/local
    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

# Apache
RUN a2enmod actions alias rewrite ssl proxy proxy_fcgi setenvif headers && \
    a2dismod mpm_event && a2enmod mpm_worker

# Config Apache.
ADD configs/apache/security.conf ${APACHE_CONF_DIR}/conf-available/security-unicaen.conf
ADD ${APACHE_CONF_LOCAL_DIR}/security.conf ${APACHE_CONF_DIR}/conf-available/security-unicaen.conf
RUN a2disconf security.conf && \
    a2enconf security-unicaen.conf

# Scripts maison
ADD scripts/update-satis.sh /usr/local/bin/update-satis
RUN chmod 755 /usr/local/bin/update-satis
    a2enconf security-unicaen.conf php${PHP_VERSION}-fpm

# Composer
RUN curl -sS https://getcomposer.org/installer --proxy  ${HTTP_PROXY} | php -- --install-dir=/usr/local/bin --filename=composer && \
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --version 1.10.19 && \
    composer global require hirak/prestissimo --no-plugins --no-scripts

# Nettoyage
+33 −17
Original line number Diff line number Diff line
@@ -4,6 +4,8 @@
#
#                   Script d'install d'un serveur, traduction du Dockerfile.
#
#                                         PHP 5.6
#
################################################################################################################

usage() {
@@ -18,24 +20,30 @@ EOF

################################################################################################################

#export http_proxy=
#export https_proxy=
#export no_proxy=

export PHP_VERSION="$1"
export OCI8_PACKAGE="oci8-2.0.12"
export APACHE_CONF_DIR=/etc/apache2
export PHP_CONF_DIR=/etc/php/${PHP_VERSION}

export APACHE_CONF_LOCAL_DIR=configs/apache
export PHP_CONF_LOCAL_DIR=configs/php/5.x

# Mise à niveau de la distrib
echo "Acquire::http::proxy \"${HTTP_PROXY}\";" > /etc/apt/apt.conf.d/05proxy
#echo "Acquire::http::proxy \"${http_proxy}\";" >> /etc/apt/apt.conf.d/05proxy
#echo "Acquire::https::proxy \"${https_proxy}\";" >> /etc/apt/apt.conf.d/05proxy
apt -qq update && apt -y full-upgrade

# PHP 7.x PPA repository
apt install -y wget lsb-release apt-transport-https ca-certificates
echo "http_proxy = ${HTTP_PROXY}"  >> /etc/wgetrc
echo "https_proxy = ${HTTP_PROXY}" >> /etc/wgetrc
#echo "http_proxy = ${http_proxy}"  >> /etc/wgetrc
#echo "https_proxy = ${https_proxy}" >> /etc/wgetrc
#echo "no_proxy = ${no_proxy}" >> /etc/wgetrc
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list
export http_proxy=${HTTP_PROXY}
export https_proxy=${HTTP_PROXY}
export ftp_proxy=${HTTP_PROXY}
export no_proxy=unicaen.fr

# Installation des packages requis.
apt -qq update && \
@@ -62,7 +70,6 @@ apt -qq update && \
        libmemcached-tools \
        netcat-openbsd \
        php-pear \
        php-dev \
        php${PHP_VERSION} \
        php${PHP_VERSION}-bcmath \
        php${PHP_VERSION}-curl \
@@ -83,6 +90,11 @@ apt -qq update && \
        php${PHP_VERSION}-xdebug \
        php${PHP_VERSION}-xml \
        php${PHP_VERSION}-zip \
        php${PHP_VERSION}-cli \
        php${PHP_VERSION}-common \
        php${PHP_VERSION}-json \
        php${PHP_VERSION}-opcache \
        php${PHP_VERSION}-readline \
        ssh \
        ssl-cert \
        subversion \
@@ -91,11 +103,16 @@ apt -qq update && \
        wget \
        zlib1g-dev

# Forçage de la version de PHP CLI
update-alternatives --set php /usr/bin/php${PHP_VERSION}

# Config PHP.
cp configs/php.conf ${PHP_CONF_DIR}/fpm/conf.d/20-php-unicaen.ini
cp configs/php-opcache.ini ${PHP_CONF_DIR}/fpm/conf.d/20-opcache-unicaen.ini
cp ${PHP_CONF_LOCAL_DIR}/opcache.ini ${PHP_CONF_DIR}/fpm/conf.d/90-opcache.ini
cp ${PHP_CONF_LOCAL_DIR}/php.conf    ${PHP_CONF_DIR}/fpm/conf.d/91-unicaen.ini
cp ${PHP_CONF_LOCAL_DIR}/xdebug.conf ${PHP_CONF_DIR}/fpm/conf.d/92-xdebug.ini

# Package PHP Oracle OCI8
#pear config-set http_proxy "${http_proxy}"
cp resources/instantclient-basiclite-linux.x64-12.2.0.1.0.zip /tmp/
cp resources/instantclient-sdk-linux.x64-12.2.0.1.0.zip /tmp/
cp resources/instantclient-sqlplus-linux.x64-12.2.0.1.0.zip /tmp/
@@ -105,21 +122,20 @@ unzip -o /tmp/instantclient-sqlplus-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/local/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

# Apache
a2enmod actions alias rewrite ssl proxy proxy_fcgi setenvif headers && \
a2dismod mpm_event mpm_prefork && a2enmod mpm_worker
a2enconf php${PHP_VERSION}-fpm

# Scripts maison
cp scripts/update-satis.sh /usr/local/bin/update-satis
chmod 755 /usr/local/bin/update-satis
cp ${APACHE_CONF_LOCAL_DIR}/security.conf ${APACHE_CONF_DIR}/conf-available/security-unicaen.conf
a2disconf security.conf && \
a2enconf security-unicaen.conf php${PHP_VERSION}-fpm

# Composer
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \
curl -sS https://getcomposer.org/installer --proxy "${http_proxy}" | php -- --install-dir=/usr/local/bin --filename=composer --version 1.10.19
composer global require hirak/prestissimo --no-plugins --no-scripts

# Nettoyage

Dockerfile-7.x

0 → 100644
+156 −0
Original line number Diff line number Diff line
###########################################################################################
#
#                               Image Unicaen
#
#                                PHP 7.x
#
###########################################################################################

#
# NB: Derrière un proxy, transmission nécessaire des variables d'env `http_*` via `--build-arg` :
#   --build-arg http_proxy
#   --build-arg https_proxy
#   --build-arg no_proxy
#

FROM debian:stretch as distrib
#FROM localhost:5000/stretch

LABEL maintainer="Bertrand GAUTHIER <bertrand.gauthier at unicaen.fr>"

# Variables d'ENVironnement nécessaires au build
ARG PHP_VERSION
ENV PHP_VERSION=${PHP_VERSION} \
    OCI8_PACKAGE="oci8-2.2.0" \
    APACHE_CONF_DIR=/etc/apache2 \
    PHP_CONF_DIR=/etc/php/${PHP_VERSION}

ENV HTTP_PROXY=${http_proxy} \
    HTTPS_PROXY=${https_proxy} \
    NO_PROXY=${no_proxy} \
    http_proxy=${http_proxy} \
    https_proxy=${https_proxy} \
    no_proxy=${no_proxy}

ENV APACHE_CONF_LOCAL_DIR=configs/apache \
    PHP_CONF_LOCAL_DIR=configs/php/7.x

# Mise à niveau de la distrib
RUN apt-get -qq update

# Repositories fournissant PHP 5.x, 7.x et 8.x
RUN apt-get install -y wget lsb-release apt-transport-https ca-certificates && \
    wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg && \
    echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/php.list


FROM distrib as install

# Installation des packages communs
RUN apt-get -qq update && \
    apt-get install -y \
        apache2 \
        ca-certificates \
        curl \
        ghostscript \
        ghostscript-x \
        git \
        ldap-utils \
        libaio1 \
        libcurl4-openssl-dev \
        libfreetype6-dev \
        libicu-dev \
        libjpeg62-turbo-dev \
        libldap2-dev \
        libmcrypt-dev \
        libmemcached-dev \
        libssl-dev \
        libxml2-dev \
        make \
        memcached \
        libmemcached-tools \
        netcat-openbsd \
        php-pear \
        php${PHP_VERSION} \
        php${PHP_VERSION}-bcmath \
        php${PHP_VERSION}-curl \
        php${PHP_VERSION}-dev \
        php${PHP_VERSION}-fpm \
        php${PHP_VERSION}-gd \
        php${PHP_VERSION}-gettext \
        php${PHP_VERSION}-iconv \
        php${PHP_VERSION}-imagick \
        php${PHP_VERSION}-intl \
        php${PHP_VERSION}-ldap \
        php${PHP_VERSION}-mbstring \
        php${PHP_VERSION}-memcached \
        php${PHP_VERSION}-mysql \
        php${PHP_VERSION}-opcache \
        php${PHP_VERSION}-pgsql \
        php${PHP_VERSION}-soap \
        php${PHP_VERSION}-xdebug \
        php${PHP_VERSION}-xml \
        php${PHP_VERSION}-zip \
        php${PHP_VERSION}-cli \
        php${PHP_VERSION}-common \
        php${PHP_VERSION}-json \
        php${PHP_VERSION}-opcache \
        php${PHP_VERSION}-readline \
        ssh \
        ssl-cert \
        subversion \
        unzip \
        vim \
        wget \
        zlib1g-dev

# Forçage de la version de PHP CLI
RUN update-alternatives --set php /usr/bin/php${PHP_VERSION}

# Config PHP
ADD ${PHP_CONF_LOCAL_DIR}/opcache.ini ${PHP_CONF_DIR}/fpm/conf.d/90-opcache.ini
ADD ${PHP_CONF_LOCAL_DIR}/php.conf    ${PHP_CONF_DIR}/fpm/conf.d/91-unicaen.ini
ADD ${PHP_CONF_LOCAL_DIR}/xdebug.conf ${PHP_CONF_DIR}/fpm/conf.d/92-xdebug.ini

# Package PHP Oracle OCI8
ADD resources/instantclient-basiclite-linux.x64-18.5.0.0.0dbru.zip /tmp/
ADD resources/instantclient-sdk-linux.x64-18.5.0.0.0dbru.zip /tmp/
ADD resources/instantclient-sqlplus-linux.x64-18.5.0.0.0dbru.zip /tmp/
RUN unzip -o /tmp/instantclient-basiclite-linux.x64-18.5.0.0.0dbru.zip -d /usr/local/ && \
    unzip -o /tmp/instantclient-sdk-linux.x64-18.5.0.0.0dbru.zip -d /usr/local/ && \
    unzip -o /tmp/instantclient-sqlplus-linux.x64-18.5.0.0.0dbru.zip -d /usr/local/ && \
    ln -s /usr/local/instantclient_18_5 /usr/local/instantclient && \
    ln -s /usr/local/instantclient/sqlplus /usr/bin/sqlplus && \
    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

# Apache
RUN a2enmod actions alias rewrite ssl proxy proxy_fcgi setenvif headers && \
    a2dismod mpm_event && a2enmod mpm_worker
ADD ${APACHE_CONF_LOCAL_DIR}/security.conf ${APACHE_CONF_DIR}/conf-available/security-unicaen.conf
RUN a2disconf security.conf && \
    a2enconf security-unicaen.conf php${PHP_VERSION}-fpm

# Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --version 1.10.19 && \
    composer global require hirak/prestissimo --no-plugins --no-scripts

# Install de laminas-migration
RUN composer global require laminas/laminas-migration && \
    ln -s /root/.composer/vendor/bin/laminas-migration /usr/local/bin/laminas-migration

# Nettoyage
RUN apt-get autoremove -y && apt-get clean && rm -rf /tmp/* /var/tmp/*

# Copie les fichiers situés dans ./entrypoint.d dans le dossier /entrypoint.d de l'image.
# Les scripts exécutables parmi eux seront exécutés au démarrage du container (cf. entrypoint.sh).
# Attention : les noms de fichiers ne doivent être constitués que de lettres minuscules ou majuscules,
# de chiffres, de tirets bas (underscore) ou de tirets ; extension interdite, donc.
ADD entrypoint.d/* /entrypoint.d/

# Entry point
ADD entrypoint.sh /sbin/entrypoint.sh
RUN chmod 755 /sbin/entrypoint.sh
CMD ["/sbin/entrypoint.sh"]
Loading