Created
August 21, 2021 03:54
-
-
Save supakornkim/f72907593aa514a8d70c641206785ccc to your computer and use it in GitHub Desktop.
Dockerfile for PHP - laravel with upload max filesize 20M
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.3.23-apache | |
RUN a2enmod rewrite | |
RUN docker-php-ext-install mysqli | |
RUN apt-get update \ | |
&& apt-get install -y default-mysql-client \ | |
&& apt-get install -y libzip-dev \ | |
&& apt-get install -y zlib1g-dev \ | |
&& apt-get install -y libxml2-dev \ | |
&& apt-get install -y libpng-dev \ | |
&& apt-get install -y libxslt-dev \ | |
&& apt-get install -y libjpeg-dev \ | |
&& apt-get install -y libfreetype6-dev \ | |
&& apt-get install -y libjpeg62-turbo-dev \ | |
&& apt-get install -y bzip2 \ | |
&& docker-php-ext-install zip \ | |
&& docker-php-ext-install pdo_mysql \ | |
&& rm -rf /var/lib/apt/lists/* | |
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer | |
RUN echo 'memory_limit = -1' >> /usr/local/etc/php/conf.d/docker-php-memlimit.ini; | |
RUN echo 'upload_max_filesize = 20M' >> /usr/local/etc/php/conf.d/uploads.ini; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment