File tree Expand file tree Collapse file tree 3 files changed +32
-2
lines changed Expand file tree Collapse file tree 3 files changed +32
-2
lines changed Original file line number Diff line number Diff line change 1+ FROM php:8.2-apache
2+
3+ RUN apt-get update \
4+ && apt-get install -y libicu-dev
5+
6+ RUN mkdir /var/www/html/PHP-Frameworks-Bench
7+
8+ # Need it in a lot of frameworks
9+ RUN docker-php-ext-install intl
10+
11+ # Optional opcache (recommended)
12+ # RUN docker-php-ext-install opcache
13+
14+ ENV PORT 80
15+ ENTRYPOINT []
16+ CMD sed -i "s/80/$PORT/g" /etc/apache2/sites-available/000-default.conf /etc/apache2/ports.conf && docker-php-entrypoint apache2-foreground
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ if [ ! ` which docker` ]; then
4+ echo " docker not found."
5+ exit 1;
6+ fi
7+
8+ PORT=${1:- 8080}
9+
10+ docker build --tag bench/apache -f .docker/apache.dockerfile .
11+
12+ echo " Runing apache in http://127.0.0.1:$PORT "
13+ echo -e " Press Ctrl+C to stop. \n\n"
14+
15+ docker run -it --net=host -e PORT=" $PORT " -v " $PWD " :/var/www/html/PHP-Frameworks-Bench:rw bench/apache:latest
Original file line number Diff line number Diff line change @@ -40,8 +40,7 @@ benchmark () {
4040
4141 rps=` grep " Requests/sec:" " $output_wrk " | tr -cd ' 0-9.' `
4242
43- echo " rps: "
44- numfmt --g " $rps "
43+ echo " rps: $rps "
4544
4645 # to make a small gap between the WRK and CURL
4746 sleep 1
You can’t perform that action at this time.
0 commit comments