Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 1 addition & 39 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,56 +8,18 @@ COPY ./composer.lock /src/
RUN composer install --ignore-platform-reqs --optimize-autoloader \
--no-plugins --no-scripts --prefer-dist

FROM php:8.0.18-cli-alpine3.15 as step1

ENV PHP_SWOOLE_VERSION=v5.0.2

RUN \
apk add --no-cache --virtual .deps \
make \
automake \
autoconf \
gcc \
g++ \
git \
zlib-dev

RUN \
## Swoole Extension
git clone --depth 1 --branch $PHP_SWOOLE_VERSION https://github.com/swoole/swoole-src.git && \
cd swoole-src && \
phpize && \
./configure --enable-http2 && \
make && make install && \
cd ..

FROM php:8.0-cli-alpine as final
FROM appwrite/base:0.10.4 AS final

LABEL maintainer="team@appwrite.io"

RUN \
apk update \
&& apk add --no-cache --virtual .deps \
gcc \
g++ \
&& apk add --no-cache \
libstdc++ \
&& apk del .deps \
&& rm -rf /var/cache/apk/*

WORKDIR /code

COPY --from=step0 /src/vendor /code/vendor
COPY --from=step1 /usr/local/lib/php/extensions/no-debug-non-zts-20200930/swoole.so /usr/local/lib/php/extensions/no-debug-non-zts-20200930/

# Add Source Code
COPY ./src /code/src
COPY ./phpunit.xml /code/


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

EXPOSE 80

CMD [ "php", "tests/e2e/server.php"]
8 changes: 7 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,11 @@
"laravel/pint": "1.2.*",
"phpstan/phpstan": "^1.10"
},
"minimum-stability": "dev"
"minimum-stability": "dev",
"config": {
"allow-plugins": {
"php-http/discovery": true,
"tbachert/spi": true
}
}
}
Loading