Skip to content

Commit 1a52eaa

Browse files
authored
Merge pull request #20 from appwrite/feat-implement-xdebug
Add XDebug
2 parents 340e545 + 1a1b87b commit 1a52eaa

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

Dockerfile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ ENV PHP_REDIS_VERSION="5.3.7" \
1010
PHP_ZSTD_VERSION="0.12.3" \
1111
PHP_BROTLI_VERSION="0.14.0" \
1212
PHP_SNAPPY_VERSION="c27f830dcfe6c41eb2619a374de10fd0597f4939" \
13-
PHP_LZ4_VERSION="2f006c3e4f1fb3a60d2656fc164f9ba26b71e995"
13+
PHP_LZ4_VERSION="2f006c3e4f1fb3a60d2656fc164f9ba26b71e995" \
14+
PHP_XDEBUG_VERSION="3.2.2"
1415

1516
RUN \
1617
apk add --no-cache --virtual .deps \
@@ -136,6 +137,15 @@ RUN git clone --depth 1 https://github.com/DomBlack/php-scrypt.git \
136137
&& ./configure --enable-scrypt \
137138
&& make && make install
138139

140+
## XDebug Extension
141+
FROM compile AS xdebug
142+
RUN \
143+
git clone --depth 1 --branch $PHP_XDEBUG_VERSION https://github.com/xdebug/xdebug && \
144+
cd xdebug && \
145+
phpize && \
146+
./configure && \
147+
make && make install
148+
139149
FROM php:8.2.6-cli-alpine3.18 as final
140150

141151
LABEL maintainer="team@appwrite.io"
@@ -195,6 +205,7 @@ COPY --from=zstd /usr/local/lib/php/extensions/no-debug-non-zts-20220829/zstd.so
195205
COPY --from=brotli /usr/local/lib/php/extensions/no-debug-non-zts-20220829/brotli.so /usr/local/lib/php/extensions/no-debug-non-zts-20220829/
196206
COPY --from=lz4 /usr/local/lib/php/extensions/no-debug-non-zts-20220829/lz4.so /usr/local/lib/php/extensions/no-debug-non-zts-20220829/
197207
COPY --from=snappy /usr/local/lib/php/extensions/no-debug-non-zts-20220829/snappy.so /usr/local/lib/php/extensions/no-debug-non-zts-20220829/
208+
COPY --from=xdebug /usr/local/lib/php/extensions/no-debug-non-zts-20220829/xdebug.so /usr/local/lib/php/extensions/no-debug-non-zts-20220829/
198209

199210
# Enable Extensions
200211
RUN echo extension=swoole.so >> /usr/local/etc/php/conf.d/swoole.ini

0 commit comments

Comments
 (0)