forked from dunglas/php-dev-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
82 lines (73 loc) · 1.69 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
70
71
72
73
74
75
76
77
78
79
80
81
82
FROM debian
COPY --from=caddy:latest /usr/bin/caddy /usr/bin/caddy
ENV CFLAGS="-ggdb3"
ENV PHPIZE_DEPS \
autoconf \
dpkg-dev \
file \
g++ \
gcc \
libc-dev \
make \
pkg-config \
re2c
RUN apt-get update && \
apt-get -y --no-install-recommends install \
$PHPIZE_DEPS \
build-essential \
automake \
ca-certificates \
libargon2-dev \
libonig-dev \
libreadline-dev \
libsodium-dev \
libsqlite3-dev \
libssl-dev \
libxml2-dev \
zlib1g-dev \
bison \
# Dev tools \
openssl \
git \
clang \
llvm \
gdb \
valgrind \
neovim \
zsh \
libtool-bin && \
echo 'set auto-load safe-path /' > /root/.gdbinit && \
echo '* soft core unlimited' >> /etc/security/limits.conf \
&& \
apt-get clean
RUN cd /usr/src/ && \
git clone --recurse-submodules -j$(nproc) https://github.com/nghttp2/nghttp2 && \
cd nghttp2 && \
autoreconf -i && \
automake && \
autoconf && \
./configure --enable-debug && \
make -j$(nproc) && \
make install
RUN cd /usr/src/ && \
git clone https://github.com/curl/curl && \
cd curl && \
autoreconf -fi && \
./configure --enable-debug --with-openssl && \
make -j$(nproc) && \
make install
RUN cd /usr/src/ && \
git clone https://github.com/php/php-src.git && \
cd php-src && \
# --enable-embed is only necessary to generate libphp.so, we don't use this SAPI directly
./buildconf -f && \
./configure \
--enable-debug \
--with-curl \
--with-readline && \
make -j$(nproc) && \
make install && \
ldconfig && \
php --version
WORKDIR /usr/src/php-src
CMD [ "zsh" ]