Created
October 3, 2020 06:47
-
-
Save antonmaju/452912ddcd84767c1071b51057516edc to your computer and use it in GitHub Desktop.
PHP-72 Dockerfile
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:7.2-apache | |
ARG apache_uid=1000 | |
ARG apache_gid=1000 | |
RUN apt-get update && a2enmod rewrite && apt-get install -y --force-yes libfreetype6-dev libjpeg62-turbo-dev libpng-dev libmcrypt-dev libzip-dev libmemcached-dev zlib1g-dev \ | |
&& docker-php-ext-install gettext exif sockets mysqli pdo_mysql zip \ | |
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \ | |
&& docker-php-ext-install gd \ | |
&& pecl install memcached-3.0.4 mcrypt-1.0.1 \ | |
&& docker-php-ext-enable memcached mcrypt \ | |
&& sed -i "/<Directory \/var\/www\/>/,/<\/Directory>/ s/AllowOverride None/AllowOverride All/" /etc/apache2/apache2.conf \ | |
&& mkdir /etc/apache2/dev \ | |
&& sed -i -e "\$a IncludeOptional /etc/apache2/dev/*.conf" /etc/apache2/apache2.conf | |
RUN iptables -t nat -A OUTPUT -o lo -p tcp --dport 5000 -j REDIRECT --to- | |
port 80 | |
RUN usermod --non-unique --uid ${apache_gid} www-data && groupmod --non-unique --gid ${apache_gid} www-data | |
RUN service apache2 restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment