Skip to content

Commit 241cd90

Browse files
committed
Use utopia base
1 parent a375c36 commit 241cd90

1 file changed

Lines changed: 2 additions & 41 deletions

File tree

Dockerfile

Lines changed: 2 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,9 @@ RUN composer install \
1212
--no-scripts \
1313
--prefer-dist
1414

15-
FROM php:8.4.18-cli-alpine3.22 AS compile
15+
FROM utopia-php/base:php-8.4-0.2.1 AS compile
1616

17-
ENV PHP_REDIS_VERSION="6.3.0" \
18-
PHP_SWOOLE_VERSION="v6.1.6" \
19-
PHP_XDEBUG_VERSION="3.4.2" \
20-
PHP_MONGODB_VERSION="2.1.1"
21-
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
17+
ENV PHP_MONGODB_VERSION="2.1.1"
2218

2319
RUN apk update && apk add --no-cache \
2420
libpq \
@@ -28,8 +24,6 @@ RUN apk update && apk add --no-cache \
2824
autoconf \
2925
gcc \
3026
g++ \
31-
git \
32-
brotli-dev \
3327
linux-headers \
3428
docker-cli \
3529
docker-cli-compose \
@@ -48,24 +42,6 @@ RUN apk update && apk add --no-cache \
4842
&& apk del libpq-dev \
4943
&& rm -rf /var/cache/apk/*
5044

51-
# Redis Extension
52-
FROM compile AS redis
53-
RUN \
54-
git clone --depth 1 --branch $PHP_REDIS_VERSION https://github.com/phpredis/phpredis.git \
55-
&& cd phpredis \
56-
&& phpize \
57-
&& ./configure \
58-
&& make && make install
59-
60-
## Swoole Extension
61-
FROM compile AS swoole
62-
RUN \
63-
git clone --depth 1 --branch $PHP_SWOOLE_VERSION https://github.com/swoole/swoole-src.git \
64-
&& cd swoole-src \
65-
&& phpize \
66-
&& ./configure --enable-http2 \
67-
&& make && make install
68-
6945
## PCOV Extension
7046
FROM compile AS pcov
7147
RUN \
@@ -75,15 +51,6 @@ RUN \
7551
&& ./configure --enable-pcov \
7652
&& make && make install
7753

78-
## XDebug Extension
79-
FROM compile AS xdebug
80-
RUN \
81-
git clone --depth 1 --branch $PHP_XDEBUG_VERSION https://github.com/xdebug/xdebug && \
82-
cd xdebug && \
83-
phpize && \
84-
./configure && \
85-
make && make install
86-
8754
FROM compile AS final
8855

8956
LABEL maintainer="team@appwrite.io"
@@ -93,10 +60,7 @@ ENV DEBUG=$DEBUG
9360

9461
WORKDIR /usr/src/code
9562

96-
RUN echo extension=redis.so >> /usr/local/etc/php/conf.d/redis.ini
97-
RUN echo extension=swoole.so >> /usr/local/etc/php/conf.d/swoole.ini
9863
RUN echo extension=pcov.so >> /usr/local/etc/php/conf.d/pcov.ini
99-
RUN echo extension=xdebug.so >> /usr/local/etc/php/conf.d/xdebug.ini
10064

10165
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
10266

@@ -105,10 +69,7 @@ RUN echo "opcache.enable_cli=1" >> $PHP_INI_DIR/php.ini
10569
RUN echo "memory_limit=1024M" >> $PHP_INI_DIR/php.ini
10670

10771
COPY --from=composer /usr/local/src/vendor /usr/src/code/vendor
108-
COPY --from=swoole /usr/local/lib/php/extensions/no-debug-non-zts-20240924/swoole.so /usr/local/lib/php/extensions/no-debug-non-zts-20240924/
109-
COPY --from=redis /usr/local/lib/php/extensions/no-debug-non-zts-20240924/redis.so /usr/local/lib/php/extensions/no-debug-non-zts-20240924/
11072
COPY --from=pcov /usr/local/lib/php/extensions/no-debug-non-zts-20240924/pcov.so /usr/local/lib/php/extensions/no-debug-non-zts-20240924/
111-
COPY --from=xdebug /usr/local/lib/php/extensions/no-debug-non-zts-20240924/xdebug.so /usr/local/lib/php/extensions/no-debug-non-zts-20240924/
11273

11374
COPY ./bin /usr/src/code/bin
11475
COPY ./src /usr/src/code/src

0 commit comments

Comments
 (0)