diff --git a/docker/al2.Dockerfile b/docker/al2.Dockerfile index 015bb52..a528b39 100644 --- a/docker/al2.Dockerfile +++ b/docker/al2.Dockerfile @@ -30,13 +30,14 @@ RUN pecl install igbinary && \ ARG RELAY=v0.6.5 # Download Relay -RUN PLATFORM=$(uname -m | sed 's/_/-/') \ - && curl -L "https://builds.r2.relay.so/$RELAY/relay-$RELAY-php8.0-centos7-$PLATFORM.tar.gz" | tar xz -C /tmp +RUN ARCH=$(uname -m | sed 's/_/-/') \ + PHP=$(php -r 'echo substr(PHP_VERSION, 0, 3);') \ + && curl -L "https://builds.r2.relay.so/$RELAY/relay-$RELAY-php$PHP-centos7-$ARCH.tar.gz" | tar xz -C /tmp # Copy relay.{so,ini} -RUN PLATFORM=$(uname -m | sed 's/_/-/') \ - && cp "/tmp/relay-$RELAY-php8.0-centos7-$PLATFORM/relay.ini" $(php-config --ini-dir)/50-relay.ini \ - && cp "/tmp/relay-$RELAY-php8.0-centos7-$PLATFORM/relay-pkg.so" $(php-config --extension-dir)/relay.so +RUN ARCH=$(uname -m | sed 's/_/-/') \ + && cp "/tmp/relay-$RELAY-php8.0-centos7-$ARCH/relay.ini" $(php-config --ini-dir)/50-relay.ini \ + && cp "/tmp/relay-$RELAY-php8.0-centos7-$ARCH/relay-pkg.so" $(php-config --extension-dir)/relay.so # Inject UUID RUN sed -i "s/00000000-0000-0000-0000-000000000000/$(cat /proc/sys/kernel/random/uuid)/" $(php-config --extension-dir)/relay.so diff --git a/docker/al2023.Dockerfile b/docker/al2023.Dockerfile index 650bacd..c1ad2f9 100644 --- a/docker/al2023.Dockerfile +++ b/docker/al2023.Dockerfile @@ -17,7 +17,8 @@ RUN pecl install igbinary && \ ARG RELAY=v0.6.5 RUN ARCH=$(uname -m | sed 's/_/-/') \ - ARTIFACT="https://builds.r2.relay.so/$RELAY/relay-$RELAY-php8.1-el9-$ARCH.tar.gz" \ + PHP=$(php -r 'echo substr(PHP_VERSION, 0, 3);') \ + ARTIFACT="https://builds.r2.relay.so/$RELAY/relay-$RELAY-php$PHP-el9-$ARCH.tar.gz" \ && curl -sfSL $ARTIFACT | tar xz --strip-components=1 -C /tmp # Copy relay.{so,ini} diff --git a/docker/el9/el9.Dockerfile b/docker/el9/el9.Dockerfile index 58597b4..06c5850 100644 --- a/docker/el9/el9.Dockerfile +++ b/docker/el9/el9.Dockerfile @@ -24,7 +24,8 @@ RUN dnf -y install \ # Download Relay RUN ARCH=$(uname -m | sed 's/_/-/') \ - ARTIFACT="https://builds.r2.relay.so/$RELAY/relay-$RELAY-php8.2-el9-$ARCH.tar.gz" \ + PHP=$(php -r 'echo substr(PHP_VERSION, 0, 3);') \ + ARTIFACT="https://builds.r2.relay.so/$RELAY/relay-$RELAY-php$PHP-el9-$ARCH.tar.gz" \ && curl -L $ARTIFACT | tar -xz --strip-components=1 -C /tmp # Copy relay.{so,ini} diff --git a/docker/ubuntu/ubuntu20.Dockerfile b/docker/ubuntu/ubuntu20.Dockerfile index ccace64..acd7a22 100644 --- a/docker/ubuntu/ubuntu20.Dockerfile +++ b/docker/ubuntu/ubuntu20.Dockerfile @@ -20,13 +20,14 @@ RUN apt-get install -y \ ARG RELAY=v0.6.5 # Download Relay -RUN PLATFORM=$(uname -m | sed 's/_/-/') \ - && curl -L "https://builds.r2.relay.so/$RELAY/relay-$RELAY-php7.4-debian-$PLATFORM.tar.gz" | tar xz -C /tmp +RUN ARCH=$(uname -m | sed 's/_/-/') \ + PHP=$(php -r 'echo substr(PHP_VERSION, 0, 3);') \ + && curl -L "https://builds.r2.relay.so/$RELAY/relay-$RELAY-php$PHP-debian-$ARCH.tar.gz" | tar xz -C /tmp # Copy relay.{so,ini} -RUN PLATFORM=$(uname -m | sed 's/_/-/') \ - && cp "/tmp/relay-$RELAY-php7.4-debian-$PLATFORM/relay.ini" $(php-config --ini-dir)/30-relay.ini \ - && cp "/tmp/relay-$RELAY-php7.4-debian-$PLATFORM/relay-pkg.so" $(php-config --extension-dir)/relay.so +RUN ARCH=$(uname -m | sed 's/_/-/') \ + && cp "/tmp/relay-$RELAY-php7.4-debian-$ARCH/relay.ini" $(php-config --ini-dir)/30-relay.ini \ + && cp "/tmp/relay-$RELAY-php7.4-debian-$ARCH/relay-pkg.so" $(php-config --extension-dir)/relay.so # Inject UUID RUN sed -i "s/00000000-0000-0000-0000-000000000000/$(cat /proc/sys/kernel/random/uuid)/" $(php-config --extension-dir)/relay.so