2022-01-09 11:56:04 +00:00
|
|
|
FROM docker.io/library/php:7-apache
|
|
|
|
|
2022-02-11 13:02:39 +00:00
|
|
|
ARG version
|
2022-01-09 11:56:04 +00:00
|
|
|
|
|
|
|
RUN apt-get -y update && DEBIAN_FRONTEND=noninteractive apt-get install -y -qq zip unzip git zlib1g-dev libicu-dev g++ default-mysql-client git
|
|
|
|
RUN docker-php-ext-install intl && docker-php-ext-install pdo_mysql
|
|
|
|
|
|
|
|
RUN a2enmod rewrite
|
|
|
|
|
2022-02-10 22:47:50 +00:00
|
|
|
COPY --from=docker.io/library/composer:2.2 /usr/bin/composer /usr/bin/composer
|
2022-01-09 11:56:04 +00:00
|
|
|
|
2022-08-16 19:22:57 +00:00
|
|
|
COPY php.ini /usr/local/etc/php/php.ini
|
|
|
|
COPY apache-framadate.conf /etc/apache2/sites-enabled/framadate.conf
|
|
|
|
COPY entrypoint.sh /usr/local/bin/entrypoint
|
2022-01-09 11:56:04 +00:00
|
|
|
|
|
|
|
ENV COMPOSER_ALLOW_SUPERUSER=1
|
|
|
|
RUN set -eux; \
|
|
|
|
composer clear-cache
|
|
|
|
ENV PATH="${PATH}:/root/.composer/vendor/bin"
|
|
|
|
ENV COMPOSER_ALLOW_SUPERUSER 0
|
|
|
|
|
|
|
|
WORKDIR /var/www/framadate
|
|
|
|
|
2022-02-11 13:02:39 +00:00
|
|
|
RUN git clone -b $version --depth=1 https://framagit.org/framasoft/framadate/framadate.git .
|
2022-01-09 11:56:04 +00:00
|
|
|
RUN chown -R 33:33 .
|
|
|
|
|
|
|
|
# Some Apache and PHP configuration
|
|
|
|
RUN if [ "$ENV" = "dev" ] ; then echo Using PHP production mode ; else echo Using PHP development mode && echo "error_reporting = E_ERROR | E_WARNING | E_PARSE\ndisplay_errors = On" > /usr/local/etc/php/conf.d/php.ini ; fi
|
|
|
|
|
|
|
|
RUN rm /etc/apache2/sites-enabled/000-default.conf
|
|
|
|
EXPOSE 80
|
|
|
|
ENTRYPOINT ["entrypoint"]
|