-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
48 lines (39 loc) · 1.7 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
ARG PLATFORM=${BUILDPLATFORM:-linux/amd64}
ARG IMAGE=php
ARG TAG=8.4-cli-bookworm
FROM --platform=${PLATFORM} ${IMAGE}:${TAG}
ENV USE_ZEND_ALLOC=0
ENV USE_TRACKED_ALLOC=1
ENV ZEND_DONT_UNLOAD_MODULES=1
ENV LC_ALL="C"
RUN docker-php-source extract \
&& if test -f "/etc/debian_version"; then \
echo "deb http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm main" > "/etc/apt/sources.list.d/llvm.list" \
&& echo "deb-src http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm main" >> "/etc/apt/sources.list.d/llvm.list" \
&& curl -fsSL "https://apt.llvm.org/llvm-snapshot.gpg.key" -o "/etc/apt/trusted.gpg.d/apt.llvm.org.asc" \
&& apt-get update \
&& DEBIAN_FRONTEND="noninteractive" apt-get install -y "bison" "re2c" "zlib1g-dev" "libsqlite3-dev" "libxml2-dev" \
"autoconf" "pkg-config" "make" "gcc" "valgrind" "rsync" "git" "ssh" \
"clang-20" \
"lcov" "gzip" \
&& update-alternatives --install "/usr/bin/clang" clang "/usr/bin/clang-20" 100 \
&& update-alternatives --install "/usr/bin/clang++" clang++ "/usr/bin/clang++-20" 100; \
else \
apk add --no-cache "bison" "zlib-dev" "sqlite-dev" "libxml2-dev" \
"autoconf" "pkgconfig" "make" "gcc" "g++" "valgrind" "valgrind-dev" \
"musl-dev" "rsync" "git" "openssh" \
"patch" "lcov" "gzip"; \
fi
COPY ./pskel.sh /usr/local/bin/pskel
COPY ./patches /patches
COPY ./ext /ext
# ----
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
COPY ./ /project
COPY ./library_test.sh /usr/local/bin/library_test
ENV COMPOSER_ROOT_VERSION="9.9.9"
RUN if test -f "/etc/debian_version"; then \
apt-get update && apt-get install -y "unzip"; \
else \
apk add --no-cache "unzip"; \
fi