Commit b60a3730 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Docker: utilisation d'une variable PHP_VERSION ; plus de mention du nom de...

Docker: utilisation d'une variable PHP_VERSION ; plus de mention du nom de l'appli ou de la version de PHP dans les configs.
parent c192cf53
Loading
Loading
Loading
Loading
+1 −4
Changes for Dockerfile: 1 added line, 4 removed lines.
Original line number Diff line number Diff line
@@ -4,15 +4,12 @@
#
###########################################################################################

ARG PHP_VERSION=7.0
ARG PHP_VERSION

FROM unicaen-dev-php${PHP_VERSION}-apache

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

ENV APACHE_CONF_DIR=/etc/apache2 \
    PHP_CONF_DIR=/etc/php/${PHP_VERSION}

## Installation de packages requis.
RUN apt-get update -qq && \
    apt-get install -y \

Dockerfile-7.1

deleted100644 → 0
+0 −40
Changes for Dockerfile-7.1: 0 added lines, 40 removed lines.
Original line number Diff line number Diff line
###########################################################################################
#
#                               Image pour le dev.
#
###########################################################################################

ARG PHP_VERSION=7.1

FROM unicaen-dev-php${PHP_VERSION}-apache

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

ENV APACHE_CONF_DIR=/etc/apache2 \
    PHP_CONF_DIR=/etc/php/${PHP_VERSION}

## Installation de packages requis.
RUN apt-get update && apt-get install -y \
        ghostscript-x \
        php${PHP_VERSION}-imagick

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

# Symlink apache access and error logs to stdout/stderr so Docker logs shows them
RUN ln -sf /dev/stdout /var/log/apache2/access.log
RUN ln -sf /dev/stdout /var/log/apache2/other_vhosts_access.log
RUN ln -sf /dev/stderr /var/log/apache2/error.log

# Configuration Apache et FPM
ADD docker/apache-ports.conf    ${APACHE_CONF_DIR}/ports.conf
ADD docker/apache-site.conf     ${APACHE_CONF_DIR}/sites-available/app.conf
ADD docker/apache-site-ssl.conf ${APACHE_CONF_DIR}/sites-available/app-ssl.conf
ADD docker/fpm/pool.d/app.conf  ${PHP_CONF_DIR}/fpm/pool.d/app.conf
ADD docker/fpm/conf.d/app.ini   ${PHP_CONF_DIR}/fpm/conf.d/app.ini

# Copie des scripts complémentaires à lancer au démarrage du container
COPY docker/entrypoint.d/* /entrypoint.d/

RUN a2ensite app app-ssl && \
    service php${PHP_VERSION}-fpm reload

Dockerfile-7.2

deleted100644 → 0
+0 −40
Changes for Dockerfile-7.2: 0 added lines, 40 removed lines.
Original line number Diff line number Diff line
###########################################################################################
#
#                               Image pour le dev.
#
###########################################################################################

ARG PHP_VERSION=7.1

FROM unicaen-dev-php${PHP_VERSION}-apache

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

ENV APACHE_CONF_DIR=/etc/apache2 \
    PHP_CONF_DIR=/etc/php/${PHP_VERSION}

## Installation de packages requis.
RUN apt-get update && apt-get install -y \
        ghostscript-x \
        php${PHP_VERSION}-imagick

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

# Symlink apache access and error logs to stdout/stderr so Docker logs shows them
RUN ln -sf /dev/stdout /var/log/apache2/access.log
RUN ln -sf /dev/stdout /var/log/apache2/other_vhosts_access.log
RUN ln -sf /dev/stderr /var/log/apache2/error.log

# Configuration Apache et FPM
ADD docker/apache-ports.conf    ${APACHE_CONF_DIR}/ports.conf
ADD docker/apache-site.conf     ${APACHE_CONF_DIR}/sites-available/app.conf
ADD docker/apache-site-ssl.conf ${APACHE_CONF_DIR}/sites-available/app-ssl.conf
ADD docker/fpm/pool.d/app.conf  ${PHP_CONF_DIR}/fpm/pool.d/app.conf
ADD docker/fpm/conf.d/app.ini   ${PHP_CONF_DIR}/fpm/conf.d/app.ini

# Copie des scripts complémentaires à lancer au démarrage du container
COPY docker/entrypoint.d/* /entrypoint.d/

RUN a2ensite app app-ssl && \
    service php${PHP_VERSION}-fpm reload
+4 −3
Changes for README.md: 4 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -23,9 +23,10 @@ Enlever le `-d` (detached) pour voir les logs en direct.
    docker build \
    --add-host="proxy.unicaen.fr:10.14.128.99" \
    --add-host="svn.unicaen.fr:10.14.129.44" \
    --build-arg http_proxy="http://proxy.unicaen.fr:3128" \
    --build-arg https_proxy="http://proxy.unicaen.fr:3128" \
    --build-arg no_proxy=".unicaen.fr,localhost" \
    --build-arg PHP_VERSION=7.0 \
    --build-arg HTTP_PROXY="http://proxy.unicaen.fr:3128" \
    --build-arg HTTPS_PROXY="http://proxy.unicaen.fr:3128" \
    --build-arg NO_PROXY=".unicaen.fr,localhost" \
    -t unicaen/sygal-php7-dev-image \
    .

+6 −2
Changes for docker-compose.yml: 6 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -7,6 +7,8 @@ services:
    - sygal-import-ws
    build:
      context: .
      args:
        PHP_VERSION: 7.2
    ports:
     - "8000:80"
     - "443:443"
@@ -22,10 +24,12 @@ services:
    container_name: sygal-import-ws-container
    build:
      context: ../sygal-import-ws
      args:
        PHP_VERSION: 7.0
    ports:
     - "8080:80"
     - "8443:443"
    volumes:
     - ../sygal-import-ws:/ws
    working_dir: /ws
     - ../sygal-import-ws:/app
    working_dir: /app
    network_mode: bridge
Loading