12345678910111213141516171819202122232425262728 |
- # Download base image Ubuntu latest
- FROM ubuntu:20.04
- MAINTAINER Marcel Stangenberger <docker@xo.nl>
- # Commands
- RUN DEBIAN_FRONTEND='noninteractive' apt-get update
- RUN DEBIAN_FRONTEND='noninteractive' apt-get -y upgrade
- RUN DEBIAN_FRONTEND='noninteractive' apt-get install -y apache2 mysql-client php unzip imagemagick
- RUN DEBIAN_FRONTEND='noninteractive' apt-get install -y php-mysql php-gd php-curl php-mbstring php-xml php-zip libapache2-mod-php php-pear php-dev libmcrypt-dev php-imagick
- RUN DEBIAN_FRONTEND='noninteractive' pecl channel-update pecl.php.net
- RUN DEBIAN_FRONTEND='noninteractive' pecl update-channels
- RUN DEBIAN_FRONTEND='noninteractive' printf "\n" | pecl install
- # Exportables
- VOLUME ["/var/www/html"]
- EXPOSE 80
- # Service
- RUN /bin/sed -i 's/max_execution_time = 30/max_execution_time = 120/g' /etc/php/7.4/apache2/php.ini
- RUN /bin/sed -i 's/max_execution_time = 30/max_execution_time = 120/g' /etc/php/7.4/cli/php.ini
- RUN /bin/sed -i 's/post_max_size = 8M/post_max_size = 16M/g' /etc/php/7.4/apache2/php.ini
- RUN /bin/sed -i 's/post_max_size = 8M/post_max_size = 16M/g' /etc/php/7.4/cli/php.ini
- RUN /bin/sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 16M/g' /etc/php/7.4/apache2/php.ini
- RUN /bin/sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 16M/g' /etc/php/7.4/cli/php.ini
- RUN /bin/sed -i 's/;extension=xsl/extension=mcrypt/g' /etc/php/7.4/apache2/php.ini
- RUN /bin/sed -i 's/;extension=xsl/extension=mcrypt/g' /etc/php/7.4/cli/php.ini
- RUN chmod a+wX /var/www/html
- CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]
|