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
25 changes: 11 additions & 14 deletions docker-contributor/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ ENV DEBIAN_FRONTEND=noninteractive \
FPM_MAX_CHILDREN=40 \
DJ_SKIP_MAKE=0 \
DJ_DB_INSTALL_BARE=0 \
PHPSUPPORTED="8.1 8.2 8.3 8.4" \
DEFAULTPHPVERSION="8.4" \
PHPSUPPORTED="8.1 8.2 8.3 8.4 8.5" \
DEFAULTPHPVERSION="8.5" \
DEFAULTWEBSERVER="nginx" \
APTINSTALL="apt-get install -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold"

Expand Down Expand Up @@ -95,18 +95,15 @@ RUN for VERSION in $PHPSUPPORTED; do \

# Install blackfire probe
RUN for VERSION in $PHPSUPPORTED; do \
# Blackfire is not available yet for PHP 8.4
if [ "${VERSION}" != "8.4" ]; then \
version=$(php${VERSION} -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION.(PHP_ZTS ? '-zts' : '');") \
&& architecture=$(uname -m) \
&& curl -v -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/$architecture/$version \
&& mkdir -p /tmp/blackfire \
&& tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \
&& mv /tmp/blackfire/blackfire-*.so $(php${VERSION} -r "echo ini_get ('extension_dir');")/blackfire.so \
&& printf "extension=blackfire.so\nblackfire.agent_socket=tcp://blackfire:8307\n" > /etc/php/${VERSION}/fpm/conf.d/blackfire.ini \
&& printf "extension=blackfire.so\nblackfire.agent_socket=tcp://blackfire:8307\n" > /etc/php/${VERSION}/cli/conf.d/blackfire.ini \
&& rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz; \
fi; \
version=$(php${VERSION} -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION.(PHP_ZTS ? '-zts' : '');") \
&& architecture=$(uname -m) \
&& curl -v -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/$architecture/$version \
&& mkdir -p /tmp/blackfire \
&& tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \
&& mv /tmp/blackfire/blackfire-*.so $(php${VERSION} -r "echo ini_get ('extension_dir');")/blackfire.so \
&& printf "extension=blackfire.so\nblackfire.agent_socket=tcp://blackfire:8307\n" > /etc/php/${VERSION}/fpm/conf.d/blackfire.ini \
&& printf "extension=blackfire.so\nblackfire.agent_socket=tcp://blackfire:8307\n" > /etc/php/${VERSION}/cli/conf.d/blackfire.ini \
&& rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz; \
done

# Disable Xdebug by default
Expand Down
3 changes: 2 additions & 1 deletion docker-gitlabci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ubuntu:24.04
ENV DEBIAN_FRONTEND=noninteractive
ENV PHPSUPPORTED="7.4 8.0 8.1 8.2 8.4"
ENV PHPSUPPORTED="8.1 8.2 8.4 8.5"
ENV APTINSTALL="apt-get install -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold"
RUN useradd -m domjudge
RUN useradd -d /nonexistent -g nogroup -s /bin/false domjudge-run-0
Expand Down Expand Up @@ -28,6 +28,7 @@ RUN apt-get update && apt-get install -y \
npm \
# Code coverage for unit test \
php-pear php-dev \
&& apt purge php8.3-redis \
&& rm -rf /var/lib/apt/lists/*

# Install needed NPM packages and download chrome for the domjudge user
Expand Down