forked from open-telemetry/opentelemetry-php
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (29 loc) · 919 Bytes
/
Dockerfile
File metadata and controls
35 lines (29 loc) · 919 Bytes
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
ARG PHP_VERSION=7.4
FROM php:${PHP_VERSION}-cli-alpine as php_build
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN chmod +x /usr/local/bin/install-php-extensions; \
apk add --update binutils; \
install-php-extensions \
ast \
xdebug \
zip \
pcntl \
grpc \
protobuf \
sockets \
intl \
@composer \
; \
# strip debug symbols from extensions to reduce size
find /usr/local/lib/php/extensions -name "*.so" -exec strip --strip-debug {} \;;
FROM php_build
WORKDIR /usr/src/myapp
RUN apk add --no-cache bash git; \
find /usr/local/lib/php/extensions -type d -exec chmod +x -R {} \;; \
addgroup -g "1000" -S php; \
adduser --system \
--gecos "" \
--ingroup "php" \
--uid "1000" \
"php";
USER php