FROM php:8.2-apache # pour upgrader paheko, il suffit de modifier le numéro de version ici ENV PAHEKO_VERSION 1.3.9 ENV PAHEKO_DOWNLOAD_DIR download/paheko ENV PAHEKO_DIR /usr/share/paheko ######################################## # APT local cache # work around because COPY failed if no source file #COPY .dummy .apt-mirror-confi[g] .proxy-confi[g] / #RUN cp /.proxy-config /etc/profile.d/proxy.sh 2> /dev/null || true #RUN if [ -f /.apt-mirror-config ] ; then . /.apt-mirror-config && sed -i \ # -e "s/deb.debian.org/${APT_MIRROR_DEBIAN}/g" \ # -e "s/security.debian.org/${APT_MIRROR_DEBIAN_SECURITY}/g" \ # -e "s/archive.ubuntu.com/${APT_MIRROR_UBUNTU}/g" \ # -e "s/security.ubuntu.com/${APT_MIRROR_UBUNTU_SECURITY}/g" \ # /etc/apt/sources.list; fi ######################################## RUN apt-get update --quiet && apt-get install -y \ libicu-dev libpq-dev zlib1g-dev libicu-dev \ libzip-dev git wget zip patch imagemagick libmagickwand-dev; \ pecl install imagick; \ docker-php-ext-install zip; \ docker-php-ext-enable imagick; #install composer setup script COPY dockers/paheko/composer-setup.sh /usr/local/bin/ RUN chmod +x /usr/local/bin/composer-setup.sh #install internationalization libs RUN docker-php-ext-configure intl RUN docker-php-ext-install intl RUN docker-php-ext-install -j$(nproc) pdo ctype RUN /usr/local/bin/composer-setup.sh ADD "${PAHEKO_DOWNLOAD_DIR}/paheko-${PAHEKO_VERSION}.tar.gz" /usr/share/ RUN mv /usr/share/paheko-${PAHEKO_VERSION} ${PAHEKO_DIR} RUN echo '\n\ Options -MultiViews\n\ \n\ \n\ php_value upload_max_filesize 100M\n\ php_value post_max_size 100M\n\ php_value memory_limit 256M\n\ FallbackResource /_route.php\n\ '> ${PAHEKO_DIR}/www/.htaccess #install prince pour génération pdf RUN curl https://www.princexml.com/download/prince_20230609-1_debian12_amd64.deb --output prince.deb RUN apt-get install libdeflate0 libjbig0 libjpeg62-turbo -y #on récupère 2 paquets de sécu sur bullseyes (me demande pas pourquoi) RUN curl http://security.debian.org/debian-security/pool/updates/main/libw/libwebp/libwebp6_0.6.1-2.1+deb11u2_amd64.deb --output libwebp6_0.6.1.deb RUN curl http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.1_1.1.1n-0+deb11u5_amd64.deb --output libssl1.1_1.1.deb RUN dpkg -i libwebp6_0.6.1.deb RUN dpkg -i libssl1.1_1.1.deb RUN apt-get install libfontconfig1 libgif7 libjpeg62-turbo liblcms2-2 libtiff5-dev -y RUN apt-get install libaom3 libavif15 -y RUN dpkg -i prince.deb COPY dockers/paheko/config/factory_cron.sh ${PAHEKO_DIR}/ COPY dockers/paheko/config/factory_cron_emails.sh ${PAHEKO_DIR}/ COPY dockers/paheko/config/setupWebRights.sh ${PAHEKO_DIR}/ RUN mkdir ${PAHEKO_DIR}/users #Plugin facturation (le seul qui ne fasse pas parti de la distribution de base COPY "dockers/paheko/config/facturation.tar.gz" ${PAHEKO_DIR}/data/plugins/ RUN mkdir ${PAHEKO_DIR}/data/plugins/facturation && tar zxvf ${PAHEKO_DIR}/data/plugins/facturation.tar.gz -C ${PAHEKO_DIR}/data/plugins/facturation && rm ${PAHEKO_DIR}/data/plugins/facturation.tar.gz #fab: pour eviter l'anomalie: $msg mustn't contain any NULL byte #RUN sed -i "394i\$msg = str_replace(chr(0), '', \$msg);" ${PAHEKO_DIR}/include/lib/KD2/ErrorManager.php #install cron pour factory_cron.sh RUN apt-get install cron joe rsyslog -y RUN sed -i '/imklog/s/^/#/' /etc/rsyslog.conf RUN echo "0 1 * * * cd ${PAHEKO_DIR} && ${PAHEKO_DIR}/factory_cron.sh" >> /var/spool/cron/crontabs/root RUN echo "* * * * * cd ${PAHEKO_DIR} && ${PAHEKO_DIR}/factory_cron_emails.sh" >> /var/spool/cron/crontabs/root RUN chmod 600 /var/spool/cron/crontabs/root RUN sed -i "/exec/i\service cron start\n" /usr/local/bin/docker-php-entrypoint RUN ln -sf /usr/local/bin/php /usr/bin/ # Set owner web server RUN chown -R www-data: ${PAHEKO_DIR} #fab le 03/02/2023: pour avoir un php.ini de prod avec zend.assertions = -1 RUN cp "/usr/local/etc/php/php.ini-production" "/usr/local/etc/php/php.ini" EXPOSE 80 VOLUME [ "/usr/share/paheko/users" ]