php-apache-pagespeed/Dockerfile
Louis Vallat bf34be2bbb
Allowed the removal of essential packages
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
2021-11-25 16:10:20 +01:00

13 lines
538 B
Docker

FROM php:8-apache
EXPOSE 80
RUN apt update \
&& apt install -y wget libpq-dev \
&& wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_amd64.deb -O /tmp/modpagespeed.deb \
&& dpkg -i /tmp/modpagespeed.deb \
&& rm /tmp/modpagespeed.deb \
&& service apache2 restart \
&& mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" \
&& docker-php-ext-install -j$(nproc) opcache \
&& apt purge -y --allow-remove-essential wget $(apt-mark showauto) \
&& rm -rf /var/lib/apt/lists/*