php-apache-pagespeed/Dockerfile

14 lines
575 B
Docker
Raw Normal View History

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 wget \
&& apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 78BD65473CB3BD13 \
&& rm -rf /var/lib/apt/lists/*