Last active
August 2, 2022 11:36
-
-
Save coonica/b6fbda030baa5b9384e16b89c7f1cef0 to your computer and use it in GitHub Desktop.
Dockerfile for apache and PHP 8.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM php:8.0-apache | |
RUN apt-get update && apt-get install -y zlib1g-dev libpng-dev libzip-dev\ | |
&& docker-php-ext-install pdo pdo_mysql mysqli zip gd | |
RUN a2enmod rewrite | |
RUN apt-get install -y --no-install-recommends \ | |
libfreetype6-dev \ | |
libjpeg62-turbo-dev \ | |
libpng-dev \ | |
libxpm-dev \ | |
libvpx-dev \ | |
&& docker-php-ext-configure gd \ | |
--with-xpm=/usr/include/ \ | |
--with-jpeg=/usr/include/ \ | |
--with-freetype=/usr/include/ \ | |
&& docker-php-ext-install gd | |
RUN apt-get update -y | |
RUN apt-get install -y libmcrypt-dev | |
RUN pecl install mcrypt-1.0.4 | |
RUN apt-get install -y \ | |
ca-certificates \ | |
unzip | |
ENV APACHE_DOCUMENT_ROOT /var/www/html/public | |
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf | |
RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf | |
RUN docker-php-ext-configure opcache --enable-opcache \ | |
&& docker-php-ext-install opcache |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment