Skip to content

Commit

Permalink
change ext-grpc to ext-protobuf
Browse files Browse the repository at this point in the history
  • Loading branch information
daydaygo committed May 30, 2019
1 parent 7ca4155 commit e6166e7
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ LABEL maintainer="hyperf <group@hyperf.org>" version="1.0"
# ---------- env settings ----------
##
ENV SWOOLE_VERSION=4.3.3 \
PROTOBUF_VERSION=3.7.1 \
# install and remove building packages
PHPIZE_DEPS="autoconf dpkg-dev dpkg file g++ gcc libc-dev make php7-dev php7-pear pkgconf re2c pcre-dev zlib-dev libtool automake"

Expand Down Expand Up @@ -40,20 +41,12 @@ RUN set -ex \
&& echo "extension=swoole.so" > /etc/php7/conf.d/swoole.ini \
&& echo "swoole.use_shortname = 'Off'" >> /etc/php7/conf.d/swoole.ini \

# php extension:grpc
# php extension: protobuf
&& apk add --no-cache protobuf \
&& cd /tmp \
&& git clone -b $(curl -L https://grpc.io/release) https://github.com/grpc/grpc \
&& ( \
cd grpc \
&& git submodule update --init \
&& make && make install \
&& cd src/php/ext/grpc \
&& phpize \
&& ./configure \
&& make && make install \
&& echo "extension=grpc.so" > /etc/php7/conf.d/grpc.ini \
) \
&& rm -rf /usr/local/bin/grpc* \
&& wget http://pecl.php.net/get/protobuf-${PROTOBUF_VERSION}.tgz -O protobuf.tgz \
&& pecl install protobuf.tgz \
&& echo "extension=protobuf.so" > /etc/php7/conf.d/protobuf.ini \

# install composer
&& cd /tmp \
Expand Down

0 comments on commit e6166e7

Please sign in to comment.