-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
30 lines (25 loc) · 922 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
FROM php:8-apache
# enable mod rewrite
RUN a2enmod rewrite headers
# install gd + wget + advpng
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
wget \
advancecomp \
pngcrush \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) gd \
&& rm -rf /var/lib/apt/lists/*
# download pngout (http://www.jonof.id.au/kenutils.html)
RUN wget http://static.jonof.id.au/dl/kenutils/pngout-20200115-linux.tar.gz \
&& tar -xf pngout-20200115-linux.tar.gz \
&& rm pngout-20200115-linux.tar.gz \
&& cp pngout-20200115-linux/amd64/pngout /bin/pngout \
&& rm -rf pngout-20200115-linux
RUN mkdir -p /tmp/icons/ && chown www-data /tmp/icons \
&& mkdir -p /var/www/html/cache \
&& chown -R www-data /var/www/html/cache
COPY src/.htaccess /var/www/html/.htaccess
COPY src/icon.php /var/www/html/icon.php