Skip to content

Commit

Permalink
Merge pull request #18 from appwrite/feat-update-versions
Browse files Browse the repository at this point in the history
Update base image and extension versions
  • Loading branch information
abnegate authored Aug 17, 2023
2 parents 89ab31a + 5351b67 commit aee71d0
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 28 deletions.
52 changes: 25 additions & 27 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
FROM php:8.0.18-cli-alpine3.15 as compile

ENV PHP_REDIS_VERSION=5.3.7 \
PHP_MONGODB_VERSION=1.16.1 \
PHP_SWOOLE_VERSION=v5.0.1 \
PHP_IMAGICK_VERSION=3.7.0 \
PHP_YAML_VERSION=2.2.3 \
PHP_MAXMINDDB_VERSION=v1.11.0 \
PHP_SCRYPT_COMMIT_SHA="845b889bdbe817afe1633237f8fc68667c7a700b" \
PHP_ZSTD_VERSION="9a01a21b1f1555100540db0ae4f71274407f7896" \
PHP_BROTLI_VERSION="50aa46650c79339e5e886919dbfcb6edac00967f" \
FROM php:8.0.30-cli-alpine3.16 as compile

ENV PHP_REDIS_VERSION="5.3.7" \
PHP_MONGODB_VERSION="1.16.1" \
PHP_SWOOLE_VERSION="v5.0.3" \
PHP_IMAGICK_VERSION="3.7.0" \
PHP_YAML_VERSION="2.2.3" \
PHP_MAXMINDDB_VERSION="v1.11.0" \
PHP_SCRYPT_VERSION="2.0.1" \
PHP_ZSTD_VERSION="0.12.3" \
PHP_BROTLI_VERSION="0.14.0" \
PHP_SNAPPY_VERSION="c27f830dcfe6c41eb2619a374de10fd0597f4939" \
PHP_LZ4_VERSION="2f006c3e4f1fb3a60d2656fc164f9ba26b71e995"

Expand Down Expand Up @@ -112,19 +112,19 @@ RUN git clone --recursive -n https://github.com/kjdev/php-ext-zstd.git \
## Brotli Extension
FROM compile as brotli
RUN git clone https://github.com/kjdev/php-ext-brotli.git \
&& cd php-ext-brotli \
&& git reset --hard $PHP_BROTLI_VERSION \
&& phpize \
&& ./configure --with-libbrotli \
&& make && make install
&& cd php-ext-brotli \
&& git reset --hard $PHP_BROTLI_VERSION \
&& phpize \
&& ./configure --with-libbrotli \
&& make && make install

## LZ4 Extension
FROM compile AS lz4
RUN git clone --recursive https://github.com/kjdev/php-ext-lz4.git \
&& cd php-ext-lz4 \
&& git reset --hard $PHP_LZ4_VERSION \
&& phpize \
&& ./configure --with-lz4-includedir=/usr \
&& ./configure --with-lz4-includedir=/usr \
&& make && make install

## Snappy Extension
Expand All @@ -138,20 +138,19 @@ RUN git clone --recursive https://github.com/kjdev/php-ext-snappy.git \

## Scrypt Extension
FROM compile AS scrypt
RUN \
git clone --depth 1 https://github.com/DomBlack/php-scrypt.git && \
cd php-scrypt && \
git checkout $PHP_SCRYPT_COMMIT_SHA && \
phpize && \
./configure --enable-scrypt && \
make && make install
RUN git clone --depth 1 https://github.com/DomBlack/php-scrypt.git \
&& cd php-scrypt \
&& git reset --hard $PHP_SCRYPT_VERSION \
&& phpize \
&& ./configure --enable-scrypt \
&& make && make install

FROM php:8.0.18-cli-alpine3.15 as final
FROM php:8.0.30-cli-alpine3.16 as final

LABEL maintainer="[email protected]"

ENV DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
ENV DOCKER_COMPOSE_VERSION=v2.5.0
ENV DOCKER_COMPOSE_VERSION=v2.20.3

RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

Expand Down Expand Up @@ -205,7 +204,6 @@ COPY --from=brotli /usr/local/lib/php/extensions/no-debug-non-zts-20200930/brotl
COPY --from=lz4 /usr/local/lib/php/extensions/no-debug-non-zts-20200930/lz4.so /usr/local/lib/php/extensions/no-debug-non-zts-20200930/
COPY --from=snappy /usr/local/lib/php/extensions/no-debug-non-zts-20200930/snappy.so /usr/local/lib/php/extensions/no-debug-non-zts-20200930/


# 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
Expand Down
2 changes: 1 addition & 1 deletion tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ commandTests:
- name: 'Imagemagick command'
command: "magick"
args: ["--version"]
expectedOutput: [".*ImageMagick 7.1.0-16.*"]
expectedOutput: [".*ImageMagick 7.1.0-50.*"]
- name: 'rsync command'
command: "rsync"
args: ["--version"]
Expand Down

0 comments on commit aee71d0

Please sign in to comment.