bookstack/example/images/bookstack/Dockerfile

58 lines
1.5 KiB
Docker

FROM danielberteaud/php:82.24.4-1
MAINTAINER Daniel Berteaud <dbd@ehtrace.com>
ARG BOOKSTACK_VERSION=24.02.3
ENV LANG=fr_FR.utf8 \
TZ=Europe/Paris \
APP_ROOT=/app/public \
BOOKSTACK_INIT_DB=true \
WKHTMLTOPDF=/usr/local/bin/wkhtmltopdf \
APP_ENV=production \
APP_TIMEZONE='Europe/Paris' \
SESSION_SECURE_COOKIE=true
USER root
COPY --from=danielberteaud/wkhtmltopdf:24.4-1 /usr/local/bin/wkhtmltopdf /usr/local/bin/wkhtmltopdf
RUN set -euxo pipefail &&\
apk add --no-cache \
php${PHP_VERSION}-tokenizer \
php${PHP_VERSION}-simplexml \
&&\
# For wkhtml2pdf \
apk add --no-cache \
libstdc++ \
libx11 \
libxrender \
libxext \
ca-certificates \
fontconfig \
freetype \
ttf-dejavu \
ttf-droid \
ttf-freefont \
ttf-liberation \
&&\
apk add --no-cache --virtual .build-deps \
msttcorefonts-installer \
&&\
# Install microsoft fonts \
update-ms-fonts &&\
fc-cache -f &&\
# Clean up when done \
rm -rf /tmp/* &&\
apk del .build-deps &&\
curl -sSL https://github.com/BookStackApp/BookStack/archive/refs/tags/v${BOOKSTACK_VERSION}.tar.gz |\
tar xvz -C /app --strip-components 1 &&\
cd /app/ &&\
COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev &&\
rm -rf storage bootstrap/cache public/uploads &&\
ln -sf /data/app/storage storage &&\
ln -sf /data/app/cache bootstrap/cache &&\
ln -s /data/app/uploads public/uploads
COPY root/ /
USER nginx