Skip to content

Commit bdf0b32

Browse files
authored
Drop relay-pkg.so from docker files (#189)
1 parent 2b26a9a commit bdf0b32

File tree

8 files changed

+69
-27
lines changed

8 files changed

+69
-27
lines changed

docker/arch.Dockerfile

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,37 @@
1-
FROM archlinux:latest
1+
FROM archlinux:base-devel
22

33
RUN pacman -Syu --noconfirm \
44
&& pacman -S --noconfirm php
55

6-
ARG RELAY=v0.12.1
6+
RUN curl -L -o /tmp/go-pear.phar https://pear.php.net/go-pear.phar && \
7+
php /tmp/go-pear.phar
78

89
# Install Relay dependencies
910
RUN pacman -S --noconfirm \
10-
base-devel \
11-
# hiredis \
1211
libck \
1312
lz4
1413

15-
# Install hiredis-ssl
14+
# Install Relay dependency (hiredis)
1615
RUN curl -L https://github.com/redis/hiredis/archive/refs/tags/v1.2.0.tar.gz | tar -xzC /tmp \
17-
&& PREFIX=/usr USE_SSL=1 make -C /tmp/hiredis-1.2.0 install
18-
19-
# Install php-pear
20-
RUN curl -L https://aur.archlinux.org/cgit/aur.git/snapshot/php-pear.tar.gz | sudo -u nobody tar -xzC /tmp \
21-
&& pushd /tmp/php-pear \
22-
&& sudo -u nobody makepkg --skippgpcheck \
23-
&& pacman -U --noconfirm php-pear-1:1.10.23-2-any.pkg.tar.zst \
24-
&& popd
16+
&& USE_SSL=1 make -C /tmp/hiredis-1.2.0 install
2517

2618
# Relay requires the `msgpack` extension
2719
RUN pecl install msgpack \
28-
&& echo "extension = msgpack.so" > $(php-config --ini-dir)/msgpack.ini
20+
&& echo "extension = msgpack.so" > $(php-config --ini-dir)/10-msgpack.ini
2921

3022
# Relay requires the `igbinary` extension
3123
RUN pecl install igbinary \
32-
&& echo "extension = igbinary.so" > $(php-config --ini-dir)/igbinary.ini
24+
&& echo "extension = igbinary.so" > $(php-config --ini-dir)/10-igbinary.ini
25+
26+
ARG RELAY=v0.12.1
3327

3428
# Download Relay
3529
RUN ARCH=$(uname -m | sed 's/_/-/') \
3630
PHP=$(php -r 'echo substr(PHP_VERSION, 0, 3);') \
3731
&& curl -L "https://builds.r2.relay.so/$RELAY/relay-$RELAY-php$PHP-el9-$ARCH.tar.gz" | tar -xz --strip-components=1 -C /tmp
3832

3933
# Copy relay.{so,ini}
40-
RUN cp "/tmp/relay.ini" "$(php-config --ini-dir)/relay.ini" \
34+
RUN cp "/tmp/relay.ini" "$(php-config --ini-dir)/20-relay.ini" \
4135
&& cp "/tmp/relay.so" "$(php-config --extension-dir)/relay.so"
4236

4337
# Inject UUID

docker/debian/debian11.Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ RUN apt-get install -y \
3232
php8.4-msgpack \
3333
php8.4-igbinary
3434

35-
# Install hiredis-ssl
36-
RUN wget -c https://github.com/redis/hiredis/archive/refs/tags/v1.2.0.tar.gz -O - | tar -xzC /tmp \
37-
&& PREFIX=/usr USE_SSL=1 make -C /tmp/hiredis-1.2.0 install
35+
# Install Relay dependency (hiredis)
36+
RUN wget -qO- https://github.com/redis/hiredis/archive/refs/tags/v1.2.0.tar.gz | tar -xzC /tmp \
37+
&& USE_SSL=1 make -C /tmp/hiredis-1.2.0 install
3838

3939
ARG RELAY=v0.12.1
4040

docker/litespeed/litespeed.Dockerfile

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,21 @@ FROM litespeedtech/litespeed:6.0.8-lsphp74
44
ENV PHP_EXT_DIR=/usr/local/lsws/lsphp74/lib/php/20190902/
55
ENV PHP_INI_DIR=/usr/local/lsws/lsphp74/etc/php/7.4/mods-available/
66

7+
RUN apt-get update && apt-get install -y \
8+
build-essential
9+
10+
# Install Relay dependencies
11+
RUN apt-get install -y \
12+
libssl-dev
13+
14+
# Install Relay dependency (hiredis)
15+
RUN curl -L https://github.com/redis/hiredis/archive/refs/tags/v1.2.0.tar.gz | tar -xzC /tmp \
16+
&& USE_SSL=1 make -C /tmp/hiredis-1.2.0 install
17+
18+
# Install Relay dependency (concurrency kit)
19+
RUN curl -L https://github.com/concurrencykit/ck/archive/refs/tags/0.7.2.tar.gz | tar -xzC /tmp \
20+
&& cd /tmp/ck-0.7.2 && ./configure && make -j$(nproc) && make install
21+
722
ARG RELAY=v0.12.1
823

924
# Download Relay
@@ -13,7 +28,7 @@ RUN PLATFORM=$(uname -m | sed 's/_/-/') \
1328
# Copy relay.{so,ini}
1429
RUN PLATFORM=$(uname -m | sed 's/_/-/') \
1530
&& cp "/tmp/relay-$RELAY-php7.4-debian-$PLATFORM/relay.ini" "$PHP_INI_DIR/60-relay.ini" \
16-
&& cp "/tmp/relay-$RELAY-php7.4-debian-$PLATFORM/relay-pkg.so" "$PHP_EXT_DIR/relay.so"
31+
&& cp "/tmp/relay-$RELAY-php7.4-debian-$PLATFORM/relay.so" "$PHP_EXT_DIR/relay.so"
1732

1833
# Inject UUID
1934
RUN sed -i "s/00000000-0000-0000-0000-000000000000/$(cat /proc/sys/kernel/random/uuid)/" "$PHP_EXT_DIR/relay.so"

docker/litespeed/openlitespeed.Dockerfile

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@ FROM litespeedtech/openlitespeed:1.7.16-lsphp81
44
ENV PHP_EXT_DIR=/usr/local/lsws/lsphp81/lib/php/20210902
55
ENV PHP_INI_DIR=/usr/local/lsws/lsphp81/etc/php/8.1/mods-available/
66

7+
RUN apt-get update && apt-get install -y \
8+
build-essential
9+
10+
# Install Relay dependencies
11+
RUN apt-get install -y \
12+
libck-dev \
13+
libssl-dev
14+
15+
# Install Relay dependency (hiredis)
16+
RUN curl -L https://github.com/redis/hiredis/archive/refs/tags/v1.2.0.tar.gz | tar -xzC /tmp \
17+
&& USE_SSL=1 make -C /tmp/hiredis-1.2.0 install
18+
719
ARG RELAY=v0.12.1
820

921
# Download Relay
@@ -13,7 +25,7 @@ RUN PLATFORM=$(uname -m | sed 's/_/-/') \
1325
# Copy relay.{so,ini}
1426
RUN PLATFORM=$(uname -m | sed 's/_/-/') \
1527
&& cp "/tmp/relay-$RELAY-php8.1-debian-$PLATFORM+libssl3/relay.ini" "$PHP_INI_DIR/60-relay.ini" \
16-
&& cp "/tmp/relay-$RELAY-php8.1-debian-$PLATFORM+libssl3/relay-pkg.so" "$PHP_EXT_DIR/relay.so"
28+
&& cp "/tmp/relay-$RELAY-php8.1-debian-$PLATFORM+libssl3/relay.so" "$PHP_EXT_DIR/relay.so"
1729

1830
# Inject UUID
1931
RUN sed -i "s/00000000-0000-0000-0000-000000000000/$(cat /proc/sys/kernel/random/uuid)/" "$PHP_EXT_DIR/relay.so"

docker/mint21.Dockerfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,24 @@ RUN apt-get install -y \
1212

1313
# Install Relay dependencies
1414
RUN apt-get install -y \
15+
libck-dev \
1516
php-msgpack \
1617
php-igbinary
1718

19+
# Install Relay dependency (hiredis)
20+
RUN curl -L https://github.com/redis/hiredis/archive/refs/tags/v1.2.0.tar.gz | tar -xzC /tmp \
21+
&& USE_SSL=1 make -C /tmp/hiredis-1.2.0 install
22+
1823
ARG RELAY=v0.12.1
1924

2025
# Download Relay
2126
RUN PHP=$(php -r 'echo substr(PHP_VERSION, 0, 3);') \
22-
&& curl -L "https://builds.r2.relay.so/$RELAY/relay-$RELAY-php$PHP-debian-x86-64+libssl3.tar.gz" | tar xz --strip-components=1 -C /tmp
27+
&& curl -L "https://builds.r2.relay.so/$RELAY/relay-$RELAY-php$PHP-debian-x86-64+libssl3.tar.gz" | \
28+
tar xz --strip-components=1 -C /tmp
2329

2430
# Copy relay.{so,ini}
2531
RUN cp "/tmp/relay.ini" $(php-config --ini-dir)/30-relay.ini \
26-
&& cp "/tmp/relay-pkg.so" $(php-config --extension-dir)/relay.so
32+
&& cp "/tmp/relay.so" $(php-config --extension-dir)/relay.so
2733

2834
# Inject UUID
2935
RUN sed -i "s/00000000-0000-0000-0000-000000000000/$(cat /proc/sys/kernel/random/uuid)/" $(php-config --extension-dir)/relay.so

docker/ubuntu/ubuntu20.Dockerfile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ RUN apt-get install -y \
1717
php-msgpack \
1818
php-igbinary
1919

20+
# Install Relay dependency (hiredis)
21+
RUN curl -L https://github.com/redis/hiredis/archive/refs/tags/v1.2.0.tar.gz | tar -xzC /tmp \
22+
&& USE_SSL=1 make -C /tmp/hiredis-1.2.0 install
23+
24+
# Install Relay dependency (concurrency kit)
25+
RUN curl -L https://github.com/concurrencykit/ck/archive/refs/tags/0.7.2.tar.gz | tar -xzC /tmp \
26+
&& cd /tmp/ck-0.7.2 && ./configure && make -j$(nproc) && make install
27+
2028
ARG RELAY=v0.12.1
2129

2230
# Download Relay
@@ -26,7 +34,7 @@ RUN ARCH=$(uname -m | sed 's/_/-/') \
2634

2735
# Copy relay.{so,ini}
2836
RUN cp "/tmp/relay.ini" $(php-config --ini-dir)/30-relay.ini \
29-
&& cp "/tmp/relay-pkg.so" $(php-config --extension-dir)/relay.so
37+
&& cp "/tmp/relay.so" $(php-config --extension-dir)/relay.so
3038

3139
# Inject UUID
3240
RUN sed -i "s/00000000-0000-0000-0000-000000000000/$(cat /proc/sys/kernel/random/uuid)/" $(php-config --extension-dir)/relay.so

docker/ubuntu/ubuntu24-zend.Dockerfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ RUN apt-get install -y \
1818
RUN apt-get install -y \
1919
php8.3-zend-xml
2020

21+
# Install Relay dependencies
22+
RUN apt-get install -y \
23+
libhiredis-dev \
24+
libck-dev
25+
2126
# Install Relay dependencies
2227
RUN pecl install \
2328
msgpack \
@@ -37,8 +42,8 @@ RUN ARCH=$(uname -m | sed 's/_/-/') \
3742
&& curl -L "https://builds.r2.relay.so/$RELAY/relay-$RELAY-php$PHP-debian-$ARCH+libssl3.tar.gz" | tar xz --strip-components=1 -C /tmp
3843

3944
# Inject UUID
40-
RUN sed -i "s/00000000-0000-0000-0000-000000000000/$(cat /proc/sys/kernel/random/uuid)/" /tmp/relay-pkg.so
45+
RUN sed -i "s/00000000-0000-0000-0000-000000000000/$(cat /proc/sys/kernel/random/uuid)/" /tmp/relay.so
4146

4247
# Copy relay.{so,ini}
4348
RUN cp "/tmp/relay.ini" /etc/php/8.3/cli/conf.d/40-relay.ini \
44-
&& cp "/tmp/relay-pkg.so" /usr/lib/php/20230831/relay.so
49+
&& cp "/tmp/relay.so" /usr/lib/php/20230831/relay.so

docker/ubuntu/ubuntu24.Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ RUN apt-get install -y \
1414

1515
# Install Relay dependencies
1616
RUN apt-get install -y \
17+
libhiredis-dev \
18+
libck-dev \
1719
php-msgpack \
1820
php-igbinary
1921

@@ -26,7 +28,7 @@ RUN ARCH=$(uname -m | sed 's/_/-/') \
2628

2729
# Copy relay.{so,ini}
2830
RUN cp "/tmp/relay.ini" $(php-config --ini-dir)/30-relay.ini \
29-
&& cp "/tmp/relay-pkg.so" $(php-config --extension-dir)/relay.so
31+
&& cp "/tmp/relay.so" $(php-config --extension-dir)/relay.so
3032

3133
# Inject UUID
3234
RUN sed -i "s/00000000-0000-0000-0000-000000000000/$(cat /proc/sys/kernel/random/uuid)/" $(php-config --extension-dir)/relay.so

0 commit comments

Comments
 (0)