1
0
Fork 0
mirror of https://github.com/24eme/signaturepdf synced 2024-06-03 06:22:13 +02:00
24eme-signaturepdf/Dockerfile
Gabriel Poma 86fc475095 docker: on génère une locale pour activer le i18n
Car sinon il est a POSIX par défaut et l'arabe et le français ne marche
pas
2023-09-26 15:06:45 +02:00

32 lines
1,009 B
Docker

FROM php:8.2-apache
ENV SERVERNAME=localhost
ENV UPLOAD_MAX_FILESIZE=24M
ENV POST_MAX_SIZE=24M
ENV MAX_FILE_UPLOADS=201
ENV PDF_STORAGE_PATH=/data
ENV DISABLE_ORGANIZATION=false
ENV PDF_DEMO_LINK=true
RUN apt update && \
apt install -y locales gettext-base librsvg2-bin pdftk imagemagick potrace ghostscript && \
docker-php-ext-install gettext && \
rm -rf /var/lib/apt/lists/*
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
COPY . /usr/local/signaturepdf
RUN envsubst < /usr/local/signaturepdf/config/php.ini > /usr/local/etc/php/conf.d/uploads.ini && \
envsubst < /usr/local/signaturepdf/config/apache.conf > /etc/apache2/sites-available/signaturepdf.conf && \
envsubst < /usr/local/signaturepdf/config/config.ini.tpl > /usr/local/signaturepdf/config/config.ini && \
a2enmod rewrite && a2ensite signaturepdf
WORKDIR /usr/local/signaturepdf
CMD /usr/local/signaturepdf/entrypoint.sh