|
1 | | -FROM archlinux:latest |
| 1 | +FROM archlinux:base-devel |
2 | 2 |
|
3 | 3 | RUN pacman -Syu --noconfirm \ |
4 | 4 | && pacman -S --noconfirm php |
5 | 5 |
|
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 |
7 | 8 |
|
8 | 9 | # Install Relay dependencies |
9 | 10 | RUN pacman -S --noconfirm \ |
10 | | - base-devel \ |
11 | | - # hiredis \ |
12 | 11 | libck \ |
13 | 12 | lz4 |
14 | 13 |
|
15 | | -# Install hiredis-ssl |
| 14 | +# Install Relay dependency (hiredis) |
16 | 15 | 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 |
25 | 17 |
|
26 | 18 | # Relay requires the `msgpack` extension |
27 | 19 | 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 |
29 | 21 |
|
30 | 22 | # Relay requires the `igbinary` extension |
31 | 23 | 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 |
33 | 27 |
|
34 | 28 | # Download Relay |
35 | 29 | RUN ARCH=$(uname -m | sed 's/_/-/') \ |
36 | 30 | PHP=$(php -r 'echo substr(PHP_VERSION, 0, 3);') \ |
37 | 31 | && curl -L "https://builds.r2.relay.so/$RELAY/relay-$RELAY-php$PHP-el9-$ARCH.tar.gz" | tar -xz --strip-components=1 -C /tmp |
38 | 32 |
|
39 | 33 | # 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" \ |
41 | 35 | && cp "/tmp/relay.so" "$(php-config --extension-dir)/relay.so" |
42 | 36 |
|
43 | 37 | # Inject UUID |
|
0 commit comments