Spaces:
Running
Running
FROM debian:12.8-slim | |
RUN DEBIAN_FRONTEND=noninteractive apt update -y | |
RUN DEBIAN_FRONTEND=noninteractive apt upgrade -y | |
RUN DEBIAN_FRONTEND=noninteractive apt install -y apache2 php net-tools php-bcmath php-bz2 php-intl php-gd php-mbstring php-mysql php-zip php-fpm php-cgi php-curl php-xml > /dev/null 2>&1 | |
#RUN a2enmod proxy_fcgi setenvif | |
RUN a2enmod rewrite env cache setenvif unique_id authz_host cgi ext_filter headers include | |
RUN DEBIAN_FRONTEND=noninteractive apt -y clean | |
RUN rm -rf /var/lib/apt/lists/* ; | |
RUN sed -i 's/Listen 80/Listen 8080/g' /etc/apache2/ports.conf | |
RUN sed -i 's/:80/:8080/g' /etc/apache2/sites-enabled/000-default.conf | |
RUN sed -i 's/variables_order = "GPCS"/variables_order = "EGPCS"/g' /etc/php/8.2/apache2/php.ini | |
RUN sed -i 's/variables_order = "GPCS"/variables_order = "EGPCS"/g' /etc/php/8.2/fpm/php.ini | |
RUN sed -i 's/variables_order = "GPCS"/variables_order = "EGPCS"/g' /etc/php/8.2/cli/php.ini | |
RUN echo "<Directory /var/www/html>" >> /etc/apache2/apache2.conf | |
RUN echo " AllowOverride All" >> /etc/apache2/apache2.conf | |
RUN echo "</Directory>" >> /etc/apache2/apache2.conf | |
RUN service apache2 start | |
#RUN service php8.2-fpm start | |
#RUN service --status-all | |
RUN chmod 777 -R /var/log/apache2 /var/run/apache2; ls -la /var/log/apache2 | |
RUN rm -rf /var/www/html/index.html | |
RUN chmod 777 /var/log/apache2/error.log; ls -la /var/log/apache2/error.log | |
#RUN chmod 777 /var/log/php8.2-fpm.log; ls -la /var/log/php8.2-fpm.log | |
#RUN chmod 777 /run/php/; ls -la /run/ | |
RUN touch .env | |
RUN chmod 777 .env | |
RUN echo ". /.env" >> /etc/apache2/envvars | |
COPY mvc /var/www/html/ | |
CMD \ | |
touch .env ; \ | |
echo export MVC_URL=$MVC_URL >> .env; \ | |
echo export MVC_APP_NAME=$MVC_APP_NAME >> .env; \ | |
echo export MVC_DATABASE_NAME=$MVC_DATABASE_NAME >> .env; \ | |
service apache2 start; \ | |
# service php8.2-fpm start && \ | |
# service php8.2-fpm status; \ | |
tail -F /var/log/apache2/* \ | |
# /var/log/php8.2-fpm.log \ | |
> /dev/null 2>&1 |