Dockerfile
Код: Выделить всё
FROM php:7.4-apache
COPY . /var/www/html/
COPY php.ini /usr/local/etc/php/
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf \
&& echo "" >> /etc/apache2/apache2.conf \
&& echo " AllowOverride All" >> /etc/apache2/apache2.conf \
&& echo " Require all granted" >> /etc/apache2/apache2.conf \
&& echo "" >> /etc/apache2/apache2.conf
RUN a2enmod rewrite
EXPOSE 80
CMD ["apache2-foreground"]
Код: Выделить всё
ErrorDocument 500 /error.html
Код: Выделить всё
Код: Выделить всё
Error Page
Unexpected Error
[img]https:/ /i.sstatic.net/JpdFUEu2.png[/img]
Запустите следующим образом:
Код: Выделить всё
docker run --rm -p8080:80 myimage
Подробнее здесь: https://stackoverflow.com/questions/787 ... che-docker
Мобильная версия