paheko_docker_image_builder/Dockerfile

44 lines
1.7 KiB
Text
Raw Normal View History

2023-01-28 15:28:34 +01:00
FROM php:8.1.12-apache-bullseye
LABEL Maintainer="Libretic"
LABEL Description="Unofficial Docker image for Paheko."
ARG PAHEKO_VERSION
ENV PAHEKO_VERSION=$PAHEKO_VERSION
ENV APACHE_DOCUMENT_ROOT /var/www/paheko/www
# Required PHP extensions and packages
RUN apt-get update && \
apt-get install -y libicu-dev zlib1g-dev libpng-dev libzip-dev libfreetype6-dev libjpeg62-turbo-dev chromium && \
docker-php-ext-configure gd --with-freetype --with-jpeg && \
docker-php-ext-install -j$(nproc) gd intl zip opcache
# Downloading and installing Paheko
RUN cd /var/www && \
curl -L -O https://fossil.kd2.org/paheko/uv/paheko-$PAHEKO_VERSION.tar.gz && \
tar xzvf paheko-$PAHEKO_VERSION.tar.gz && \
mv paheko-$PAHEKO_VERSION /var/www/paheko && \
chown -R www-data: /var/www/paheko && \
rm -f paheko-$PAHEKO_VERSION.tar.gz
# Downloading plugins
RUN cd /var/www/paheko/data/plugins/ && \
curl -L -O https://fossil.kd2.org/paheko-plugins/uv/stock_velos.tar.gz ; \
curl -L -O https://fossil.kd2.org/paheko-plugins/uv/reservations.tar.gz ; \
curl -L -O https://fossil.kd2.org/paheko-plugins/uv/webstats.tar.gz ; \
curl -L -O https://fossil.kd2.org/paheko-plugins/uv/git_documents.tar.gz ; \
curl -L -O https://fossil.kd2.org/paheko-plugins/uv/taima.tar.gz ; \
curl -L -O https://fossil.kd2.org/paheko-plugins/uv/caisse.tar.gz ; \
curl -L -O https://fossil.kd2.org/paheko-plugins/uv/helloasso.tar.gz ; \
chown -R www-data: /var/www/paheko/data/plugins
# Configure apache
RUN sed -i 's#/var/www/html#${APACHE_DOCUMENT_ROOT}#g' /etc/apache2/sites-enabled/000-default.conf
# Prepare .config dir for chromium
RUN mkdir /.config && \
chown -R www-data: /.config
# Prepare apache .htaccess
COPY .htaccess /var/www/paheko/