docker-piwigo/Dockerfile
2023-12-12 20:21:01 +00:00

61 lines
1.6 KiB
Docker
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.18
# set version label
ARG BUILD_DATE
ARG VERSION
ARG PIWIGO_RELEASE
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="thespad"
RUN \
echo "**** install packages ****" && \
apk add --no-cache \
exiftool \
ffmpeg \
imagemagick \
libjpeg-turbo-utils \
mediainfo \
php82-apcu \
php82-cgi \
php82-ctype \
php82-curl \
php82-dom \
php82-exif \
php82-gd \
php82-ldap \
php82-mysqli \
php82-mysqlnd \
php82-pear \
php82-pecl-imagick \
php82-xsl \
php82-zip \
poppler-utils \
re2c && \
echo "**** download piwigo ****" && \
if [ -z ${PIWIGO_RELEASE+x} ]; then \
PIWIGO_RELEASE=$(curl -sX GET "https://api.github.com/repos/Piwigo/Piwigo/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \
mkdir -p /app/www/public && \
curl -o \
/tmp/piwigo.zip -L \
"https://piwigo.org/download/dlcounter.php?code=${PIWIGO_RELEASE}" && \
unzip -q /tmp/piwigo.zip -d /tmp && \
mv /tmp/piwigo/* /app/www/public && \
# The max filesize is 2M by default, which is way to small for most photos
sed -ri 's/^upload_max_filesize = .*/upload_max_filesize = 100M/' /etc/php82/php.ini && \
# The max post size is 8M by default, it must be at least max_filesize
sed -ri 's/^post_max_size = .*/post_max_size = 100M/' /etc/php82/php.ini && \
echo "**** cleanup ****" && \
rm -rf \
/tmp/*
# copy local files
COPY root/ /
# ports and volumes
EXPOSE 80 443
VOLUME /config /gallery