forked from spiral/docker-php-grpc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
38 lines (29 loc) · 1.07 KB
/
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
29
30
31
32
33
34
35
36
37
38
ARG PHP_IMAGE=8.1-cli-alpine3.19
FROM --platform=${TARGETPLATFORM:-linux/amd64} php:${PHP_IMAGE}
ENV TZ="UTC"
COPY --from=ghcr.io/mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/install-php-extensions
ARG XDEBUG_ENABLED=false
ARG PROTOBUF_VERSION="4.29.1"
ARG GRPC_VERSION="1.68.0"
RUN apk update && apk add --no-cache \
bash \
ca-certificates \
icu-data-full icu-libs \
libzip \
linux-headers \
lz4-libs \
openssh-client \
${PHPIZE_DEPS}
RUN install-php-extensions grpc-${GRPC_VERSION} \
&& install-php-extensions protobuf-${PROTOBUF_VERSION} \
&& install-php-extensions intl \
&& install-php-extensions zip \
&& install-php-extensions curl \
&& install-php-extensions opcache \
&& install-php-extensions pcntl \
&& install-php-extensions sockets \
&& docker-php-ext-enable grpc protobuf
RUN if [ "${XDEBUG_ENABLED}" == "true" ]; then install-php-extensions xdebug && docker-php-ext-enable xdebug; fi
RUN apk del --no-cache ${PHPIZE_DEPS} \
&& rm -rf /tmp/*
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"