Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ RUN \
php7.3-fpm php7.3-xml php7.3-intl php7.3-mysql php7.3-mbstring php7.3-curl php7.3-zip php7.3-apcu \
php7.4-fpm php7.4-xml php7.4-intl php7.4-mysql php7.4-mbstring php7.4-curl php7.4-zip php7.4-apcu \
php8.0-fpm php8.0-xml php8.0-intl php8.0-mysql php8.0-mbstring php8.0-curl php8.0-zip php8.0-apcu \
php8.1-fpm php8.1-xml php8.1-intl php8.1-mysql php8.1-mbstring php8.1-curl php8.1-zip php8.1-apcu \
# Fix update-alternatives warning
&& touch /usr/share/man/man1/php5.6.40.gz \
&& touch /usr/share/man/man1/php7.0.33.gz \
Expand All @@ -42,6 +43,7 @@ RUN \
&& echo "phpbenchmarks ALL=(ALL) NOPASSWD: /usr/bin/update-alternatives --set php /usr/bin/php7.3" >> /etc/sudoers.d/phpbenchmarks \
&& echo "phpbenchmarks ALL=(ALL) NOPASSWD: /usr/bin/update-alternatives --set php /usr/bin/php7.4" >> /etc/sudoers.d/phpbenchmarks \
&& echo "phpbenchmarks ALL=(ALL) NOPASSWD: /usr/bin/update-alternatives --set php /usr/bin/php8.0" >> /etc/sudoers.d/phpbenchmarks \
&& echo "phpbenchmarks ALL=(ALL) NOPASSWD: /usr/bin/update-alternatives --set php /usr/bin/php8.1" >> /etc/sudoers.d/phpbenchmarks \
&& echo "phpbenchmarks ALL=(ALL) NOPASSWD: /usr/sbin/service nginx reload" >> /etc/sudoers.d/phpbenchmarks \
&& echo "phpbenchmarks ALL=(ALL) NOPASSWD: /usr/sbin/service php5.6-fpm restart" >> /etc/sudoers.d/phpbenchmarks \
&& echo "phpbenchmarks ALL=(ALL) NOPASSWD: /usr/sbin/service php7.0-fpm restart" >> /etc/sudoers.d/phpbenchmarks \
Expand All @@ -50,6 +52,7 @@ RUN \
&& echo "phpbenchmarks ALL=(ALL) NOPASSWD: /usr/sbin/service php7.3-fpm restart" >> /etc/sudoers.d/phpbenchmarks \
&& echo "phpbenchmarks ALL=(ALL) NOPASSWD: /usr/sbin/service php7.4-fpm restart" >> /etc/sudoers.d/phpbenchmarks \
&& echo "phpbenchmarks ALL=(ALL) NOPASSWD: /usr/sbin/service php8.0-fpm restart" >> /etc/sudoers.d/phpbenchmarks \
&& echo "phpbenchmarks ALL=(ALL) NOPASSWD: /usr/sbin/service php8.1-fpm restart" >> /etc/sudoers.d/phpbenchmarks \
&& chmod -R 777 \
/etc/nginx/sites-enabled \
/var/log/nginx \
Expand All @@ -60,6 +63,7 @@ RUN \
/etc/php/7.3/fpm/conf.d \
/etc/php/7.4/fpm/conf.d \
/etc/php/8.0/fpm/conf.d \
/etc/php/8.1/fpm/conf.d \
# Create phpbenchmarks user, we assume final host user id will be 1000 (should be it 99% of the time)
&& useradd -ms /bin/bash --uid 1000 phpbenchmarks \
&& usermod -a -G www-data phpbenchmarks \
Expand All @@ -79,6 +83,8 @@ RUN \
&& sed -i 's/group = www-data/group = phpbenchmarks/g' /etc/php/7.4/fpm/pool.d/www.conf \
&& sed -i 's/user = www-data/user = phpbenchmarks/g' /etc/php/8.0/fpm/pool.d/www.conf \
&& sed -i 's/group = www-data/group = phpbenchmarks/g' /etc/php/8.0/fpm/pool.d/www.conf \
&& sed -i 's/user = www-data/user = phpbenchmarks/g' /etc/php/8.1/fpm/pool.d/www.conf \
&& sed -i 's/group = www-data/group = phpbenchmarks/g' /etc/php/8.1/fpm/pool.d/www.conf \
# Define PHP 7.4 as default
&& /usr/bin/update-alternatives --set php /usr/bin/php7.4 \
# Remove nginx default page
Expand Down
2 changes: 1 addition & 1 deletion docker/build
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ readonly ROOT_DIRECTORY=$(realpath $(dirname $(realpath $0))/..)
readonly VERSION_PATH="${ROOT_DIRECTORY}/src/Version.php"
readonly IMAGE_NAME="phpbenchmarks/benchmark-kit"
readonly LOG_FILE="/tmp/benchmark-kit_build.log"
readonly DOCKER_COMPOSER_CMD="docker run -it --user $(id -u):$(id -g) -v ${ROOT_DIRECTORY}:/app composer:1.10"
readonly DOCKER_COMPOSER_CMD="docker run -it --user $(id -u):$(id -g) -v ${ROOT_DIRECTORY}:/app composer:1.10.17"

echo "Fetch Benchmark kit version."
readonly DOCKER_VERSION_CMD="docker run --rm -v ${ROOT_DIRECTORY}/src/Version.php:/app/src/Version.php php:7.4-cli-alpine3.10 php -r"
Expand Down