Ver Fonte

Initial commit

Marcel Stangenberger há 1 ano atrás
pai
commit
bf33a295f2
1 ficheiros alterados com 28 adições e 0 exclusões
  1. 28 0
      Dockerfile

+ 28 - 0
Dockerfile

@@ -0,0 +1,28 @@
+# 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"]