Commit 156f4bc5 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Mise en phase du Dockerfile avec celui de sygal; suppression du Dockerfile...

Mise en phase du Dockerfile avec celui de sygal; suppression du Dockerfile obsolète ; correction du readme
parent 0c4cd1e3
# Use this dockerfile to run apigility.
#
# Start the server using docker-compose:
#
# docker-compose build
# docker-compose up
#
# You can install dependencies via the container:
###########################################################################################
#
# docker-compose run apigility composer install
# Image pour le dev.
#
# You can manipulate dev mode from the container:
# Montage des sources attendu dans le volume "/webapp" du container.
#
# docker-compose run apigility composer development-enable
# docker-compose run apigility composer development-disable
# docker-compose run apigility composer development-status
#
# OR use plain old docker
#
# docker build -f Dockerfile -t apigility .
# docker run -d -p "8080:8080" -v $PWD:/var/www apigility
#
FROM adrianharabula/php7-with-oci8
RUN apt-get update \
&& apt-get install -y git zlib1g-dev \
&& docker-php-ext-install zip \
&& a2enmod rewrite \
&& sed -i 's!/var/www/html!/var/www/public!g' /etc/apache2/sites-available/000-default.conf \
&& mv /var/www/html /var/www/public \
&& curl -sS https://getcomposer.org/installer \
| php -- --install-dir=/usr/local/bin --filename=composer \
&& echo "AllowEncodedSlashes On" >> /etc/apache2/apache2.conf
WORKDIR /var/www
EXPOSE 8080
CMD ["php", "-S", "0.0.0.0:8080", "-ddisplay_errors=0", "-t", "/var/www/public", "/var/www/public/index.php"]
###########################################################################################
FROM php:7-apache
LABEL maintainer="Bertrand GAUTHIER <bertrand.gauthier at unicaen.fr>"
# Mise à niveau de la distrib et installation des packages requis.
RUN apt-get update && apt-get install -y \
ghostscript \
git \
libaio1 \
libcurl4-openssl-dev \
libfreetype6-dev \
libicu-dev \
libjpeg62-turbo-dev \
libldap2-dev \
libmcrypt-dev \
libmemcached-dev \
libssl-dev \
libxml2-dev \
make \
netcat-openbsd \
ssl-cert \
subversion \
unzip \
vim \
wget \
zlib1g-dev
RUN docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu && \
docker-php-ext-configure opcache --enable-opcache && \
docker-php-ext-install -j$(nproc) \
curl \
gd \
gettext \
iconv \
intl \
ldap \
mbstring \
opcache \
soap \
zip
RUN rm -rf /var/lib/apt/lists/*
# Installation d'extensions PECL
RUN pear config-set http_proxy "$HTTP_PROXY" && \
pecl install xdebug && docker-php-ext-enable xdebug && \
pecl install memcached && docker-php-ext-enable memcached
# Package PHP Oracle OCI8
ADD docker/instantclient-basiclite-linux.x64-12.2.0.1.0.zip /tmp/
ADD docker/instantclient-sdk-linux.x64-12.2.0.1.0.zip /tmp/
ADD docker/instantclient-sqlplus-linux.x64-12.2.0.1.0.zip /tmp/
RUN unzip /tmp/instantclient-basiclite-linux.x64-12.2.0.1.0.zip -d /usr/local/ && \
unzip /tmp/instantclient-sdk-linux.x64-12.2.0.1.0.zip -d /usr/local/ && \
unzip /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/bin/sqlplus && \
echo 'export LD_LIBRARY_PATH="/usr/local/instantclient"' >> /etc/apache2/envvars && \
# echo 'export LD_LIBRARY_PATH="/usr/local/instantclient"' >> /root/.bashrc && \
# echo 'umask 002' >> /root/.bashrc && \
echo 'instantclient,/usr/local/instantclient' | pecl install oci8 && \
echo "extension=oci8.so" > /usr/local/etc/php/conf.d/php-oci8.ini
ENV LD_LIBRARY_PATH /usr/local/instantclient
# Config PHP.
ADD docker/php.conf /usr/local/etc/php/conf.d/webapp.ini
#ADD docker/php-opcache.ini /usr/local/etc/php/conf.d/01-opcache.ini
# Configuration et activation des sites Apache
ADD docker/apache-ports.conf /etc/apache2/ports.conf
ADD docker/apache-site.conf /etc/apache2/sites-available/webapp.conf
ADD docker/apache-site-ssl.conf /etc/apache2/sites-available/webapp-ssl.conf
RUN a2enmod headers alias rewrite ssl && \
a2ensite webapp && \
a2ensite webapp-ssl
# Install Composer.
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
###########################################################################################
#
# Image pour le dev.
#
# Montage des sources attendu dans le volume "/webapp" du container.
#
###########################################################################################
FROM php:7-apache
LABEL maintainer="Bertrand GAUTHIER <bertrand.gauthier at unicaen.fr>"
# Mise à niveau de la distrib.
RUN apt-get update && apt-get install -y \
ghostscript \
git \
libaio1 \
libcurl4-openssl-dev \
libfreetype6-dev \
libicu-dev \
libjpeg62-turbo-dev \
libldap2-dev \
libmcrypt-dev \
libmemcached-dev \
libssl-dev \
libxml2-dev \
make \
netcat-openbsd \
ssl-cert \
subversion \
unzip \
vim \
wget \
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 \
&& docker-php-ext-configure opcache --enable-opcache && docker-php-ext-install opcache \
&& rm -rf /var/lib/apt/lists/*
# Installation d'extensions PECL
RUN pear config-set http_proxy "$HTTP_PROXY" && \
pecl install xdebug && docker-php-ext-enable xdebug && \
pecl install memcached && docker-php-ext-enable memcached
# Package PHP Oracle OCI8
ADD docker/instantclient-basiclite-linux.x64-12.2.0.1.0.zip /tmp/
ADD docker/instantclient-sdk-linux.x64-12.2.0.1.0.zip /tmp/
ADD docker/instantclient-sqlplus-linux.x64-12.2.0.1.0.zip /tmp/
RUN unzip /tmp/instantclient-basiclite-linux.x64-12.2.0.1.0.zip -d /usr/local/ && \
unzip /tmp/instantclient-sdk-linux.x64-12.2.0.1.0.zip -d /usr/local/ && \
unzip /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/bin/sqlplus && \
echo 'export LD_LIBRARY_PATH="/usr/local/instantclient"' >> /etc/apache2/envvars && \
# echo 'export LD_LIBRARY_PATH="/usr/local/instantclient"' >> /root/.bashrc && \
# echo 'umask 002' >> /root/.bashrc && \
echo 'instantclient,/usr/local/instantclient' | pecl install oci8 && \
echo "extension=oci8.so" > /usr/local/etc/php/conf.d/php-oci8.ini
ENV LD_LIBRARY_PATH /usr/local/instantclient
# Config PHP.
ADD docker/php.conf /usr/local/etc/php/conf.d/webapp.ini
#ADD docker/php-opcache.ini /usr/local/etc/php/conf.d/01-opcache.ini
# Configuration et activation des sites Apache
ADD docker/apache-ports.conf /etc/apache2/ports.conf
ADD docker/apache-site.conf /etc/apache2/sites-available/webapp.conf
ADD docker/apache-site-ssl.conf /etc/apache2/sites-available/webapp-ssl.conf
RUN a2enmod rewrite ssl && \
a2ensite webapp && \
a2ensite webapp-ssl
# Install Composer.
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
......@@ -41,7 +41,7 @@ $ git checkout 1.0.0
Installez les packages requis par le ws via [Composer](https://getcomposer.org/) comme ceci :
```bash
$ composer install
$ composer install --no-suggest --optimize-autoloader
```
### Fichier "users.htpasswd"
......
......@@ -5,7 +5,6 @@ services:
container_name: sygal-import-ws-container
build:
context: .
dockerfile: Dockerfile.php7.dev
ports:
- "8080:8080"
- "8443:8443"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment