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

Amélioration autour de Docker, notamment l'abandon des arguments de build...

Amélioration autour de Docker, notamment l'abandon des arguments de build concernant le proxy pour les mettre plutôt dans ~/.docker/config.json
parent 02649803
Loading
Loading
Loading
Loading
+6 −9
Changes for Dockerfile.php7.dev: 6 added lines, 9 removed lines.
Original line number Diff line number Diff line
@@ -10,10 +10,6 @@ FROM php:7-apache

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

ARG http_proxy
ARG https_proxy
ARG no_proxy

# Mise à niveau de la distrib.
RUN apt-get update && apt-get install -y \
        git \
@@ -32,13 +28,14 @@ RUN apt-get update && apt-get install -y \
        unzip \
        vim \
        wget \
    && docker-php-ext-install -j$(nproc) iconv gettext gd soap curl intl \
        zlib1g-dev \
    && docker-php-ext-install -j$(nproc) iconv gettext gd soap curl intl zip \
    && docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu && docker-php-ext-install ldap \
    && rm -rf /var/lib/apt/lists/*

# Installation d'extensions PECL
RUN pear config-set http_proxy "$http_proxy"
RUN pecl install xdebug && docker-php-ext-enable xdebug
RUN pear config-set http_proxy "$HTTP_PROXY" && \
    pecl install xdebug && docker-php-ext-enable xdebug

# Package PHP Oracle OCI8
ADD docker/instantclient-basiclite-linux.x64-12.2.0.1.0.zip /tmp/
@@ -63,5 +60,5 @@ ADD docker/php.conf /usr/local/etc/php/conf.d/webapp.ini
ADD docker/apache.conf /etc/apache2/sites-available/webapp.conf
RUN a2enmod rewrite && a2ensite webapp

# Point de montage pour les sources de l'appli
VOLUME /webapp
# Install Composer.
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
+5 −17
Changes for docker-compose.yml: 5 added lines, 17 removed lines.
Original line number Diff line number Diff line
@@ -2,35 +2,23 @@ version: '2'

services:
  sygal:
    container_name: sygal-container
    build:
      context: .
      dockerfile: Dockerfile.php7.dev
      args:
        http_proxy: http://10.14.128.99:3128
        https_proxy: http://10.14.128.99:3128
        no_proxy: localhost,.unicaen.fr
    ports:
     - "8000:80"
    volumes:
     - .:/webapp
    container_name: sygal-container
     - .:/sygal
    network_mode: bridge
    dns: 10.14.128.125
    dns_search: unicaen.fr

  sygal-import-ws:
    container_name: sygal-import-ws-container
    build:
      context: ../sygal-import-ws
      dockerfile: Dockerfile
      args:
        http_proxy: http://10.14.128.99:3128
        https_proxy: http://10.14.128.99:3128
        no_proxy: localhost,127.0.0.1,.unicaen.fr
      dockerfile: Dockerfile.php7.dev
    ports:
     - "8080:8080"
    volumes:
     - ../sygal-import-ws:/var/www
     - ../sygal-import-ws:/sygal-import-ws
    network_mode: bridge
    dns: 10.14.128.125
    dns_search: unicaen.fr
+2 −2
Changes for docker/apache.conf: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
<VirtualHost *:80>
     ServerName localhost
     DocumentRoot /webapp/public
     DocumentRoot /sygal/public
     RewriteEngine On

     <Directory /webapp/public>
     <Directory /sygal/public>
         DirectoryIndex index.php
         AllowOverride All
         Require all granted