-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Add PHP 8.4 support #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,197 @@ | ||
| FROM php:8.4-cli-alpine AS compile | ||
|
|
||
| ENV PHP_REDIS_VERSION="6.1.0" \ | ||
| PHP_SWOOLE_VERSION="v5.1.7" \ | ||
| PHP_IMAGICK_VERSION="3.7.0" \ | ||
| PHP_YAML_VERSION="2.2.4" \ | ||
| PHP_MAXMINDDB_VERSION="v1.12.0" \ | ||
| PHP_SCRYPT_VERSION="2.0.1" \ | ||
| PHP_ZSTD_VERSION="0.14.0" \ | ||
| PHP_BROTLI_VERSION="0.15.0" \ | ||
| PHP_SNAPPY_VERSION="0.2.2" \ | ||
| PHP_LZ4_VERSION="0.4.4" \ | ||
| PHP_XDEBUG_VERSION="3.4.1" | ||
|
|
||
| RUN \ | ||
| apk add --no-cache --virtual .deps \ | ||
| linux-headers \ | ||
| icu-dev \ | ||
| make \ | ||
| automake \ | ||
| autoconf \ | ||
| gcc \ | ||
| g++ \ | ||
| git \ | ||
| zlib-dev \ | ||
| openssl-dev \ | ||
| yaml-dev \ | ||
| imagemagick \ | ||
| imagemagick-dev \ | ||
| libjpeg-turbo-dev \ | ||
| jpeg-dev \ | ||
| libjxl-dev \ | ||
| libmaxminddb-dev \ | ||
| zstd-dev \ | ||
| brotli-dev \ | ||
| lz4-dev \ | ||
| curl-dev | ||
|
|
||
| RUN docker-php-ext-install sockets | ||
|
|
||
| FROM compile AS redis | ||
| RUN \ | ||
| # Redis Extension | ||
| git clone --depth 1 --branch $PHP_REDIS_VERSION https://github.com/phpredis/phpredis.git && \ | ||
| cd phpredis && \ | ||
| phpize && \ | ||
| ./configure && \ | ||
| make && make install | ||
|
|
||
| ## Swoole Extension | ||
| FROM compile AS swoole | ||
| RUN \ | ||
| git clone --depth 1 --branch $PHP_SWOOLE_VERSION https://github.com/swoole/swoole-src.git && \ | ||
| cd swoole-src && \ | ||
| phpize && \ | ||
| ./configure --enable-sockets --enable-http2 --enable-openssl --enable-swoole-curl && \ | ||
| make && make install && \ | ||
| cd .. | ||
|
|
||
| ## Imagick Extension | ||
| FROM compile AS imagick | ||
| RUN \ | ||
| git clone --depth 1 --branch $PHP_IMAGICK_VERSION https://github.com/imagick/imagick && \ | ||
| cd imagick && \ | ||
| phpize && \ | ||
| ./configure && \ | ||
| make && make install | ||
|
|
||
| ## YAML Extension | ||
| FROM compile AS yaml | ||
| RUN \ | ||
| git clone --depth 1 --branch $PHP_YAML_VERSION https://github.com/php/pecl-file_formats-yaml && \ | ||
| cd pecl-file_formats-yaml && \ | ||
| phpize && \ | ||
| ./configure && \ | ||
| make && make install | ||
|
|
||
| ## Maxminddb extension | ||
| FROM compile AS maxmind | ||
| RUN \ | ||
| git clone --depth 1 --branch $PHP_MAXMINDDB_VERSION https://github.com/maxmind/MaxMind-DB-Reader-php.git && \ | ||
| cd MaxMind-DB-Reader-php && \ | ||
| cd ext && \ | ||
| phpize && \ | ||
| ./configure && \ | ||
| make && make install | ||
|
|
||
| # Zstd Compression | ||
| FROM compile AS zstd | ||
| RUN git clone --recursive -n https://github.com/kjdev/php-ext-zstd.git \ | ||
| && cd php-ext-zstd \ | ||
| && git checkout $PHP_ZSTD_VERSION \ | ||
| && phpize \ | ||
| && ./configure --with-libzstd \ | ||
| && make && make install | ||
|
|
||
| ## 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 | ||
|
|
||
| ## 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 \ | ||
| && make && make install | ||
|
|
||
| ## Snappy Extension | ||
| FROM compile AS snappy | ||
| RUN git clone --recursive https://github.com/kjdev/php-ext-snappy.git \ | ||
| && cd php-ext-snappy \ | ||
| && git reset --hard $PHP_SNAPPY_VERSION \ | ||
| && phpize \ | ||
| && ./configure \ | ||
| && make && make install | ||
|
|
||
| ## Scrypt Extension | ||
| FROM compile AS scrypt | ||
| 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 | ||
|
|
||
| ## XDebug Extension | ||
| FROM compile AS xdebug | ||
| RUN \ | ||
| git clone --depth 1 --branch $PHP_XDEBUG_VERSION https://github.com/xdebug/xdebug && \ | ||
| cd xdebug && \ | ||
| phpize && \ | ||
| ./configure && \ | ||
| make && make install | ||
|
|
||
| FROM php:8.4-cli-alpine AS final | ||
|
|
||
| LABEL maintainer="[email protected]" | ||
|
|
||
| RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||
|
|
||
| RUN \ | ||
| apk update \ | ||
| && apk add --no-cache \ | ||
| linux-headers \ | ||
| rsync \ | ||
| brotli-dev \ | ||
| lz4-dev \ | ||
| zstd-dev \ | ||
| yaml-dev \ | ||
| imagemagick \ | ||
| libjpeg-turbo \ | ||
| libjxl \ | ||
| libavif \ | ||
| libheif \ | ||
| imagemagick-heic \ | ||
| libgomp \ | ||
| libwebp \ | ||
| git \ | ||
| && rm -rf /var/cache/apk/* | ||
|
|
||
| RUN docker-php-ext-install sockets | ||
|
|
||
| WORKDIR /usr/src/code | ||
|
|
||
| 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/ | ||
| 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/ | ||
| COPY --from=imagick /usr/local/lib/php/extensions/no-debug-non-zts-20240924/imagick.so /usr/local/lib/php/extensions/no-debug-non-zts-20240924/ | ||
| COPY --from=yaml /usr/local/lib/php/extensions/no-debug-non-zts-20240924/yaml.so /usr/local/lib/php/extensions/no-debug-non-zts-20240924/ | ||
| COPY --from=scrypt /usr/local/lib/php/extensions/no-debug-non-zts-20240924/scrypt.so /usr/local/lib/php/extensions/no-debug-non-zts-20240924/ | ||
| COPY --from=zstd /usr/local/lib/php/extensions/no-debug-non-zts-20240924/zstd.so /usr/local/lib/php/extensions/no-debug-non-zts-20240924/ | ||
| COPY --from=brotli /usr/local/lib/php/extensions/no-debug-non-zts-20240924/brotli.so /usr/local/lib/php/extensions/no-debug-non-zts-20240924/ | ||
| COPY --from=lz4 /usr/local/lib/php/extensions/no-debug-non-zts-20240924/lz4.so /usr/local/lib/php/extensions/no-debug-non-zts-20240924/ | ||
| COPY --from=snappy /usr/local/lib/php/extensions/no-debug-non-zts-20240924/snappy.so /usr/local/lib/php/extensions/no-debug-non-zts-20240924/ | ||
| 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/ | ||
ChiragAgg5k marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| # 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=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 | ||
|
|
||
| EXPOSE 80 | ||
|
|
||
| CMD [ "tail", "-f", "/dev/null" ] | ||
|
|
||
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| schemaVersion: '2.0.0' | ||
|
|
||
| fileExistenceTests: | ||
| ## Extension files | ||
| - name: 'Check swoole extension' | ||
| path: /usr/local/lib/php/extensions/no-debug-non-zts-20240924/swoole.so | ||
| shouldExist: true | ||
| - name: 'Check redis extension' | ||
| path: /usr/local/lib/php/extensions/no-debug-non-zts-20240924/redis.so | ||
| shouldExist: true | ||
| - name: 'Check imagick extension' | ||
| path: /usr/local/lib/php/extensions/no-debug-non-zts-20240924/imagick.so | ||
| shouldExist: true | ||
| - name: 'Check yaml extension' | ||
| path: /usr/local/lib/php/extensions/no-debug-non-zts-20240924/yaml.so | ||
| shouldExist: true | ||
| - name: 'Check scrypt extension' | ||
| path: /usr/local/lib/php/extensions/no-debug-non-zts-20240924/scrypt.so | ||
| shouldExist: true | ||
| - name: 'Check zstd extension' | ||
| path: /usr/local/lib/php/extensions/no-debug-non-zts-20240924/zstd.so | ||
| shouldExist: true | ||
| - name: 'Check brotli extension' | ||
| path: /usr/local/lib/php/extensions/no-debug-non-zts-20240924/brotli.so | ||
| shouldExist: true | ||
| - name: 'Check lz4 extension' | ||
| path: /usr/local/lib/php/extensions/no-debug-non-zts-20240924/lz4.so | ||
| shouldExist: true | ||
| - name: 'Check snappy extension' | ||
| path: /usr/local/lib/php/extensions/no-debug-non-zts-20240924/snappy.so | ||
| shouldExist: true | ||
ChiragAgg5k marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
ChiragAgg5k marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.