-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
28 lines (26 loc) · 845 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM php:8.2-alpine3.20
LABEL maintainer="Andrea Falco <andrea@falco.sh>"
# PHP ext-phpiredis
ARG PHPEXT_PHPIREDIS_VERSION=1.1
RUN set -eux; \
persistentDeps=" \
hiredis \
"; \
buildDeps=" \
hiredis-dev \
"; \
apk add --no-cache --virtual .phpiredis-persistent-deps ${persistentDeps}; \
apk add --no-cache --virtual .phpiredis-build-deps ${buildDeps}; \
\
mkdir -p /usr/src/php/ext/phpiredis; \
curl -fsSL https://github.com/nrk/phpiredis/archive/refs/heads/v${PHPEXT_PHPIREDIS_VERSION}.tar.gz \
| tar -xzC "/usr/src/php/ext/phpiredis" --strip 1; \
\
docker-php-ext-configure phpiredis \
--enable-phpiredis \
; \
docker-php-ext-install -j$(nproc) phpiredis; \
\
apk del --no-cache --no-network .phpiredis-build-deps; \
docker-php-source delete; \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*