forked from spiral/docker-php-grpc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
69 lines (58 loc) · 1.4 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
ARG PHP_IMAGE=8.1.3-cli-alpine3.15
FROM --platform=${TARGETPLATFORM:-linux/amd64} php:$PHP_IMAGE as builder
# Basic libs
RUN apk update
RUN apk add --no-cache \
bash \
make \
curl \
libcurl \
git
RUN apk add --no-cache \
openssh-client \
wget \
zip \
nano \
tmux \
patch
RUN apk add --no-cache \
oniguruma \
oniguruma-dev \
libgcrypt \
libgcrypt-dev \
ca-certificates \
pcre-dev \
openssl-dev
RUN apk add --no-cache \
freetype-dev autoconf g++ \
libmcrypt-dev libxml2-dev \
icu-dev \
libxslt-dev \
gnu-libiconv \
libzip-dev \
libpq-dev \
linux-headers \
grpc \
protobuf \
${PHPIZE_DEPS}
RUN rm -rf /var/lib/apt/lists/*
ARG PROTOBUF_VERSION="3.21.1"
RUN pecl channel-update pecl.php.net \
&& MAKEFLAGS="-j $(nproc)" pecl install protobuf-${PROTOBUF_VERSION} grpc
RUN docker-php-ext-install \
opcache \
zip \
xsl \
dom \
exif \
intl \
pcntl \
bcmath \
sockets
RUN docker-php-ext-enable \
protobuf \
grpc
ARG XDEBUG_ENABLED=false
RUN if [ "${XDEBUG_ENABLED}" == "true" ]; then pecl install xdebug && docker-php-ext-enable xdebug; fi
RUN docker-php-source delete \
&& apk del ${BUILD_DEPENDS}