Skip to content

Commit 3fdaadb

Browse files
committed
By pass docker gateway
for performance reasons
1 parent 43351a5 commit 3fdaadb

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.docker/apache.dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,7 @@ RUN docker-php-ext-install intl
1010

1111
# Optional opcache (recommended)
1212
#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

apache.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ docker build --tag bench/apache -f .docker/apache.dockerfile .
1212
echo "Runing apache in http://127.0.0.1:$PORT"
1313
echo -e "Press Ctrl+C to stop. \n\n"
1414

15-
docker run -it -p "$PORT":80 -v "$PWD":/var/www/html/PHP-Frameworks-Bench:rw bench/apache:latest
15+
docker run -it --net=host -e PORT="$PORT" -v "$PWD":/var/www/html/PHP-Frameworks-Bench:rw bench/apache:latest

0 commit comments

Comments
 (0)