-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from appwrite/extensions
feat: cloud extensions
- Loading branch information
Showing
2 changed files
with
71 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,9 @@ ENV PHP_REDIS_VERSION="6.1.0" \ | |
PHP_BROTLI_VERSION="0.15.0" \ | ||
PHP_SNAPPY_VERSION="c27f830dcfe6c41eb2619a374de10fd0597f4939" \ | ||
PHP_LZ4_VERSION="2f006c3e4f1fb3a60d2656fc164f9ba26b71e995" \ | ||
PHP_XDEBUG_VERSION="3.3.2" | ||
PHP_XDEBUG_VERSION="3.3.2" \ | ||
PHP_OPENTELEMETRY_VERSION="1.1.0" \ | ||
PHP_PROTOBUF_VERSION="4.28.3" | ||
|
||
RUN \ | ||
apk add --no-cache --virtual .deps \ | ||
|
@@ -31,6 +33,8 @@ RUN \ | |
imagemagick-dev \ | ||
libjpeg-turbo-dev \ | ||
jpeg-dev \ | ||
zlib-dev \ | ||
libpng-dev \ | ||
libjxl-dev \ | ||
libmaxminddb-dev \ | ||
zstd-dev \ | ||
|
@@ -151,6 +155,15 @@ RUN \ | |
./configure && \ | ||
make && make install | ||
|
||
FROM compile AS opentelemetry | ||
RUN pecl install opentelemetry-${PHP_OPENTELEMETRY_VERSION} | ||
|
||
FROM compile AS protobuf | ||
RUN pecl install protobuf-${PHP_PROTOBUF_VERSION} | ||
|
||
FROM compile AS gd | ||
RUN docker-php-ext-install gd | ||
|
||
FROM $BASEIMAGE as final | ||
|
||
LABEL maintainer="[email protected]" | ||
|
@@ -188,6 +201,8 @@ RUN \ | |
libavif \ | ||
libheif \ | ||
imagemagick-heic \ | ||
zlib-dev \ | ||
libpng-dev \ | ||
libmaxminddb-dev \ | ||
certbot \ | ||
docker-cli \ | ||
|
@@ -217,18 +232,12 @@ COPY --from=brotli /usr/local/lib/php/extensions/no-debug-non-zts-20230831/brotl | |
COPY --from=lz4 /usr/local/lib/php/extensions/no-debug-non-zts-20230831/lz4.so /usr/local/lib/php/extensions/no-debug-non-zts-20230831/ | ||
COPY --from=snappy /usr/local/lib/php/extensions/no-debug-non-zts-20230831/snappy.so /usr/local/lib/php/extensions/no-debug-non-zts-20230831/ | ||
COPY --from=xdebug /usr/local/lib/php/extensions/no-debug-non-zts-20230831/xdebug.so /usr/local/lib/php/extensions/no-debug-non-zts-20230831/ | ||
COPY --from=opentelemetry /usr/local/lib/php/extensions/no-debug-non-zts-20230831/opentelemetry.so /usr/local/lib/php/extensions/no-debug-non-zts-20230831/ | ||
COPY --from=protobuf /usr/local/lib/php/extensions/no-debug-non-zts-20230831/protobuf.so /usr/local/lib/php/extensions/no-debug-non-zts-20230831/ | ||
COPY --from=gd /usr/local/lib/php/extensions/no-debug-non-zts-20230831/gd.so /usr/local/lib/php/extensions/no-debug-non-zts-20230831/ | ||
|
||
# Enable Extensions | ||
RUN echo extension=swoole.so >> /usr/local/etc/php/conf.d/swoole.ini | ||
RUN echo extension=redis.so >> /usr/local/etc/php/conf.d/redis.ini | ||
RUN echo extension=imagick.so >> /usr/local/etc/php/conf.d/imagick.ini | ||
RUN echo extension=yaml.so >> /usr/local/etc/php/conf.d/yaml.ini | ||
RUN echo extension=maxminddb.so >> /usr/local/etc/php/conf.d/maxminddb.ini | ||
RUN echo extension=scrypt.so >> /usr/local/etc/php/conf.d/scrypt.ini | ||
RUN echo extension=zstd.so >> /usr/local/etc/php/conf.d/zstd.ini | ||
RUN echo extension=brotli.so >> /usr/local/etc/php/conf.d/brotli.ini | ||
RUN echo extension=lz4.so >> /usr/local/etc/php/conf.d/lz4.ini | ||
RUN echo extension=snappy.so >> /usr/local/etc/php/conf.d/snappy.ini | ||
RUN docker-php-ext-enable swoole redis imagick yaml maxminddb scrypt zstd brotli lz4 snappy opentelemetry protobuf gd | ||
|
||
EXPOSE 80 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters