-
Notifications
You must be signed in to change notification settings - Fork 113
/
Dockerfile
25 lines (23 loc) · 1.11 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
FROM php:7.3.26-cli-alpine3.12
RUN \
curl -sfL http://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer && \
chmod +x /usr/bin/composer && \
composer self-update --clean-backups 2.0.8 && \
apk update && \
apk add --no-cache libstdc++ && \
apk add --no-cache --virtual .build-deps $PHPIZE_DEPS openssl-dev pcre-dev pcre2-dev zlib-dev && \
docker-php-ext-install sockets && \
docker-php-source extract && \
mkdir /usr/src/php/ext/swoole && \
curl -sfL https://github.com/swoole/swoole-src/archive/v4.5.11.tar.gz -o swoole.tar.gz && \
tar xfz swoole.tar.gz --strip-components=1 -C /usr/src/php/ext/swoole && \
docker-php-ext-configure swoole \
--enable-http2 \
--enable-mysqlnd \
--enable-openssl \
--enable-sockets --enable-swoole-json && \
docker-php-ext-install -j$(nproc) swoole && \
rm -f swoole.tar.gz $HOME/.composer/*-old.phar && \
docker-php-source delete && \
apk del .build-deps
WORKDIR "/var/www/"