service-dolibarr/Dockerfile
Glenn e7108f75ff
Some checks reported errors
continuous-integration/drone/push Build was killed
fix: avoid timeout during install (php + httpd)
2024-08-06 16:01:21 +02:00

67 lines
2.3 KiB
Docker

FROM php:8.1-apache-bookworm
# FROM php:7.4-apache-buster
MAINTAINER Glenn ROLLAND <glenux@glenux.net>
RUN apt-get update \
&& apt-cache search lib mysql dev$ \
&& apt-get install -y \
unzip curl \
libfreetype6-dev \
libicu-dev \
libjpeg62-turbo-dev \
libmariadb-dev \
libpng-dev \
libzip-dev \
libc-client-dev \
libkrb5-dev \
zlib1g-dev \
&& apt-get autoremove -y \
&& docker-php-ext-install -j$(nproc) iconv \
&& docker-php-ext-configure intl \
&& docker-php-ext-install -j$(nproc) intl \
&& docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ \
&& docker-php-ext-install -j$(nproc) gd \
&& docker-php-ext-install pdo pdo_mysql mysqli \
&& docker-php-ext-install calendar \
&& docker-php-ext-configure imap --with-kerberos --with-imap-ssl \
&& docker-php-ext-install imap \
&& docker-php-ext-install zip
COPY php-uploads.ini /usr/local/etc/php/conf.d/glenux-uploads.ini
COPY php-performance.ini /usr/local/etc/php/conf.d/glenux-performance.ini
COPY php-errors.ini /usr/local/etc/php/conf.d/glenux-errors.ini
RUN curl -sS https://getcomposer.org/installer \
| php -- --install-dir=/usr/local/bin --filename=composer
ENV DOLIBARR_VERSION=19.0.2
# ENV DOLIBARR_VERSION=18.0.4
# ENV DOLIBARR_VERSION=17.0.2
# ENV DOLIBARR_VERSION=16.0.4
# https://github.com/Dolibarr/dolibarr/archive/${DOLIBARR_VERSION}.zip
# https://freefr.dl.sourceforge.net/project/dolibarr/Dolibarr%20ERP-CRM/${DOLIBARR_VERSION}/dolibarr-${DOLIBARR_VERSION}.zip
RUN curl -sS \
https://freefr.dl.sourceforge.net/project/dolibarr/Dolibarr%20ERP-CRM/${DOLIBARR_VERSION}/dolibarr-${DOLIBARR_VERSION}.zip \
-o /tmp/dolibarr-${DOLIBARR_VERSION}.zip
RUN unzip -q -d /usr/src /tmp/dolibarr-${DOLIBARR_VERSION}.zip \
&& chown -R www-data:www-data /usr/src/dolibarr-${DOLIBARR_VERSION} \
&& rm -fr /var/www/html \
&& cp -a /usr/src/dolibarr-${DOLIBARR_VERSION} /var/www/html
WORKDIR /var/www/html
# RUN pwd \
# && ls -lh \
# && mv composer.json.disabled composer.json \
# && composer install
# Fix configuration
RUN sed -i 's|/var/www/html|/var/www/html/htdocs|' \
/etc/apache2/sites-enabled/000-default.conf \
&& sed -i 's|^Timeout .*|Timeout 1200|' \
/etc/apache2/apache2.conf
CMD ["apache2-foreground"]