-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
32 lines (28 loc) · 1005 Bytes
/
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
26
27
28
29
30
31
32
FROM rshop/php:7.3
ENV SWOOLE_VERSION v4.4.25
RUN apk update \
&& apk add --no-cache \
libstdc++ \
openssl \
&& apk add --no-cache --virtual .build-deps \
$PHPIZE_DEPS \
libaio-dev \
openssl-dev \
&& curl -SL "https://github.com/swoole/swoole-src/archive/${SWOOLE_VERSION}.tar.gz" -o /tmp/swoole.tar.gz \
&& cd /tmp \
&& mkdir swoole \
&& tar -xf swoole.tar.gz -C swoole --strip-components=1 \
&& ln -s /usr/bin/phpize7 /usr/local/bin/phpize \
&& ln -s /usr/bin/php-config7 /usr/local/bin/php-config \
&& ( \
cd swoole \
&& phpize \
&& ./configure --enable-mysqlnd --enable-openssl --enable-http2 \
&& make -s -j$(nproc) && make install \
) \
&& echo "extension=swoole.so" > /etc/php7/conf.d/50_swoole.ini \
&& apk del .build-deps \
&& apk del --purge *-dev \
&& rm -rf /var/cache/apk/* /tmp/* /usr/share/man /usr/local/bin/php*
COPY conf.d/* /etc/php7/conf.d/
EXPOSE 9501