-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
33 lines (29 loc) · 977 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
FROM php:7.2-apache-stretch
ENV VERSION 2.9.4
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y \
libpng-dev \
imagemagick \
curl \
unzip
RUN docker-php-ext-install -j$(nproc) \
mysqli \
pdo \
pdo_mysql \
gd \
mbstring \
exif
RUN curl -L "http://piwigo.org/download/dlcounter.php?code=${VERSION}" -o /piwigo.zip \
&& unzip /piwigo.zip -d /var/www \
&& rm -rf /var/www/html \
&& mv /var/www/piwigo /var/www/html \
&& rm /piwigo.zip \
&& sed -i "s#if (\$result)#if (pwg_db_num_rows(\$result))#" /var/www/html/include/functions_session.inc.php
RUN apt-get autoremove --purge -y unzip \
&& rm -rf /var/lib/apt/lists/*
COPY assets/database.inc.php /var/www/html/local/config/database.inc.php
RUN chown www-data: /var/www/html/local/config/database.inc.php
RUN chmod 600 /var/www/html/local/config/database.inc.php
VOLUME "/var/www/html/_data"
VOLUME "/var/www/html/upload"