Created
March 18, 2021 09:30
-
-
Save Jeckerson/57920de3247a140033949d5af5c153ab to your computer and use it in GitHub Desktop.
FrameworkBenchmarks dockerfile for Phalcon with PHP8
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 ubuntu:20.04 | |
| ARG DEBIAN_FRONTEND=noninteractive | |
| RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null | |
| RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php | |
| RUN apt-get update -yqq > /dev/null && \ | |
| apt-get install -yqq nginx git unzip curl \ | |
| php8.0-cli php8.0-fpm php8.0-mysql php8.0-mbstring wget > /dev/null | |
| RUN curl -sSL https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer | |
| COPY deploy/conf/* /etc/php/8.0/fpm/ | |
| ADD ./ /phalcon | |
| WORKDIR /phalcon | |
| RUN apt-get install -yqq php8.0-psr > /dev/null | |
| RUN wget https://github.com/zephir-lang/zephir/releases/download/0.13.0-beta-1/zephir.phar && \ | |
| chmod ugo+x zephir.phar && \ | |
| mv zephir.phar /usr/local/bin/zephir && \ | |
| apt install -y \ | |
| make \ | |
| gcc \ | |
| re2c \ | |
| autoconf \ | |
| automake \ | |
| build-essential \ | |
| php8.0-dev && \ | |
| cd /opt && \ | |
| rm -rf php-zephir-parser && \ | |
| git clone git://github.com/zephir-lang/php-zephir-parser.git && \ | |
| cd php-zephir-parser && \ | |
| phpize && \ | |
| ./configure && \ | |
| make && make install && \ | |
| echo 'extension=zephir_parser.so' > /etc/php/8.0/cli/conf.d/48-zephir_parser.ini && \ | |
| cd /opt && \ | |
| rm -rf cphalcon && \ | |
| git clone --depth=1 --branch "php-8-compile-test" "https://github.com/phalcon/cphalcon.git" && \ | |
| cd cphalcon && \ | |
| zephir fullclean && \ | |
| zephir build && \ | |
| cd ext/ && \ | |
| MAKEFLAGS="-j30" ./install && \ | |
| echo 'extension=phalcon.so' > /etc/php/8.0/fpm/conf.d/50-phalcon.ini && \ | |
| echo 'extension=phalcon.so' > /etc/php/8.0/cli/conf.d/50-phalcon.ini && \ | |
| apt purge -y make \ | |
| gcc \ | |
| re2c \ | |
| autoconf \ | |
| automake \ | |
| build-essential \ | |
| php8.0-dev && \ | |
| apt clean && \ | |
| rm /etc/php/8.0/cli/conf.d/48-zephir_parser.ini | |
| RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.0/fpm/php-fpm.conf ; fi; | |
| RUN composer install --no-dev --no-scripts --ignore-platform-reqs | |
| RUN chmod -R 777 app | |
| #RUN echo "opcache.preload=/phalcon/preload.php" >> /etc/php/7.4/fpm/php.ini | |
| EXPOSE 8080 | |
| CMD service php8.0-fpm start && \ | |
| nginx -c /phalcon/deploy/nginx.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment