Created
February 14, 2022 17:49
-
-
Save alanef/14a97ddff302a99c287bf76dcdddc8af to your computer and use it in GitHub Desktop.
This file contains hidden or 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:8.1-apache | |
| ENV PORT 80 | |
| ENTRYPOINT [] | |
| CMD sed -i "s/80/$PORT/g" /etc/apache2/sites-available/000-default.conf /etc/apache2/ports.conf && docker-php-entrypoint apache2-foreground | |
| RUN a2enmod rewrite | |
| RUN apt-get update \ | |
| && apt-get install -y libzip-dev \ | |
| && apt-get install -y libxml2-dev \ | |
| && apt-get install -y libpng-dev \ | |
| && apt-get install -y libfreetype6-dev \ | |
| && apt-get install -y mariadb-client \ | |
| && rm -rf /var/lib/apt/lists/* \ | |
| && docker-php-ext-install zip mysqli calendar | |
| RUN docker-php-ext-configure gd \ | |
| --with-freetype \ | |
| && docker-php-ext-install gd | |
| # RUN apt-get update && apt-get install -y \ | |
| # libmagickwand-dev --no-install-recommends \ | |
| # && pecl install imagick \ | |
| # && docker-php-ext-enable imagick | |
| RUN docker-php-ext-install soap | |
| RUN pecl install xdebug && docker-php-ext-enable xdebug | |
| # RUN echo 'zend_extension=xdebug.so' >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini | |
| RUN echo 'xdebug.mode=develop,debug' >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini | |
| RUN echo "xdebug.start_with_request=yes" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini | |
| RUN echo "xdebug.discover_client_host=1" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini | |
| #RUN echo "xdebug.client_host=host.docker.internal" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini | |
| #RUN echo "xdebug.idekey=docker" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini | |
| # end xdebug | |
| RUN echo 'upload_max_filesize = 750M' >> /usr/local/etc/php/php.ini | |
| RUN echo 'post_max_size = 750M' >> /usr/local/etc/php/php.ini | |
| RUN echo 'memory_limit = 128M' >> /usr/local/etc/php/php.ini | |
| RUN echo "error_log = /dev/stderr" >> /usr/local/etc/php/php.ini | |
| RUN echo "log_errors = On" >> /usr/local/etc/php/php.ini | |
| RUN usermod -u 1000 www-data | |
| # Add WP-CLI | |
| RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar | |
| RUN chmod +x wp-cli.phar | |
| RUN mv wp-cli.phar /usr/local/bin/wp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment