Merge pull request #3209 from Yohoed2000/feature/add_event_extension
Add php event extension
This commit is contained in:
commit
7eaaa0cedc
|
@ -203,6 +203,7 @@ WORKSPACE_INSTALL_SSDB=false
|
||||||
WORKSPACE_INSTALL_TRADER=false
|
WORKSPACE_INSTALL_TRADER=false
|
||||||
WORKSPACE_PROTOC_VERSION=latest
|
WORKSPACE_PROTOC_VERSION=latest
|
||||||
WORKSPACE_INSTALL_MEMCACHED=true
|
WORKSPACE_INSTALL_MEMCACHED=true
|
||||||
|
WORKSPACE_INSTALL_EVENT=false
|
||||||
|
|
||||||
### PHP_FPM ###############################################
|
### PHP_FPM ###############################################
|
||||||
|
|
||||||
|
@ -274,6 +275,7 @@ PHP_FPM_ADDITIONAL_LOCALES="en_US.UTF-8 es_ES.UTF-8 fr_FR.UTF-8"
|
||||||
PHP_FPM_INSTALL_DOCKER_CLIENT=false
|
PHP_FPM_INSTALL_DOCKER_CLIENT=false
|
||||||
PHP_FPM_DEFAULT_LOCALE=POSIX
|
PHP_FPM_DEFAULT_LOCALE=POSIX
|
||||||
PHP_FPM_XDEBUG_PORT=9003
|
PHP_FPM_XDEBUG_PORT=9003
|
||||||
|
PHP_FPM_INSTALL_EVENT=false
|
||||||
|
|
||||||
PHP_FPM_PUID=1000
|
PHP_FPM_PUID=1000
|
||||||
PHP_FPM_PGID=1000
|
PHP_FPM_PGID=1000
|
||||||
|
@ -317,6 +319,7 @@ PHP_WORKER_INSTALL_REDIS=false
|
||||||
PHP_WORKER_INSTALL_IMAP=false
|
PHP_WORKER_INSTALL_IMAP=false
|
||||||
PHP_WORKER_INSTALL_XMLRPC=false
|
PHP_WORKER_INSTALL_XMLRPC=false
|
||||||
PHP_WORKER_INSTALL_SSDB=false
|
PHP_WORKER_INSTALL_SSDB=false
|
||||||
|
PHP_WORKER_INSTALL_EVENT=false
|
||||||
|
|
||||||
PHP_WORKER_PUID=1000
|
PHP_WORKER_PUID=1000
|
||||||
PHP_WORKER_PGID=1000
|
PHP_WORKER_PGID=1000
|
||||||
|
|
|
@ -172,6 +172,7 @@ services:
|
||||||
- PROTOC_VERSION=${WORKSPACE_PROTOC_VERSION}
|
- PROTOC_VERSION=${WORKSPACE_PROTOC_VERSION}
|
||||||
- INSTALL_DOCKER_CLIENT=${WORKSPACE_INSTALL_DOCKER_CLIENT}
|
- INSTALL_DOCKER_CLIENT=${WORKSPACE_INSTALL_DOCKER_CLIENT}
|
||||||
- INSTALL_MEMCACHED=${WORKSPACE_INSTALL_MEMCACHED}
|
- INSTALL_MEMCACHED=${WORKSPACE_INSTALL_MEMCACHED}
|
||||||
|
- INSTALL_EVENT=${WORKSPACE_INSTALL_EVENT}
|
||||||
- http_proxy
|
- http_proxy
|
||||||
- https_proxy
|
- https_proxy
|
||||||
- no_proxy
|
- no_proxy
|
||||||
|
@ -274,6 +275,7 @@ services:
|
||||||
- INSTALL_ZOOKEEPER=${PHP_FPM_INSTALL_ZOOKEEPER}
|
- INSTALL_ZOOKEEPER=${PHP_FPM_INSTALL_ZOOKEEPER}
|
||||||
- INSTALL_SSDB=${PHP_FPM_INSTALL_SSDB}
|
- INSTALL_SSDB=${PHP_FPM_INSTALL_SSDB}
|
||||||
- INSTALL_TRADER=${PHP_FPM_INSTALL_TRADER}
|
- INSTALL_TRADER=${PHP_FPM_INSTALL_TRADER}
|
||||||
|
- INSTALL_EVENT=${PHP_FPM_INSTALL_EVENT}
|
||||||
- DOWNGRADE_OPENSSL_TLS_AND_SECLEVEL=${PHP_DOWNGRADE_OPENSSL_TLS_AND_SECLEVEL}
|
- DOWNGRADE_OPENSSL_TLS_AND_SECLEVEL=${PHP_DOWNGRADE_OPENSSL_TLS_AND_SECLEVEL}
|
||||||
- PUID=${PHP_FPM_PUID}
|
- PUID=${PHP_FPM_PUID}
|
||||||
- PGID=${PHP_FPM_PGID}
|
- PGID=${PHP_FPM_PGID}
|
||||||
|
@ -347,6 +349,7 @@ services:
|
||||||
- INSTALL_IMAP=${PHP_WORKER_INSTALL_IMAP}
|
- INSTALL_IMAP=${PHP_WORKER_INSTALL_IMAP}
|
||||||
- INSTALL_XMLRPC=${PHP_WORKER_INSTALL_XMLRPC}
|
- INSTALL_XMLRPC=${PHP_WORKER_INSTALL_XMLRPC}
|
||||||
- INSTALL_SSDB=${PHP_WORKER_INSTALL_SSDB}
|
- INSTALL_SSDB=${PHP_WORKER_INSTALL_SSDB}
|
||||||
|
- INSTALL_EVENT=${PHP_WORKER_INSTALL_EVENT}
|
||||||
- PUID=${PHP_WORKER_PUID}
|
- PUID=${PHP_WORKER_PUID}
|
||||||
- PGID=${PHP_WORKER_PGID}
|
- PGID=${PHP_WORKER_PGID}
|
||||||
- IMAGEMAGICK_VERSION=${PHP_WORKER_IMAGEMAGICK_VERSION}
|
- IMAGEMAGICK_VERSION=${PHP_WORKER_IMAGEMAGICK_VERSION}
|
||||||
|
|
|
@ -1236,6 +1236,38 @@ RUN if [ ${INSTALL_ZMQ} = true ]; then \
|
||||||
&& echo "extension=zmq.so" > /usr/local/etc/php/conf.d/zmq.ini \
|
&& echo "extension=zmq.so" > /usr/local/etc/php/conf.d/zmq.ini \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
|
||||||
|
############################################################################
|
||||||
|
## Event:
|
||||||
|
############################################################################
|
||||||
|
USER root
|
||||||
|
|
||||||
|
ARG INSTALL_EVENT=false
|
||||||
|
|
||||||
|
RUN set -eux; \
|
||||||
|
if [ ${INSTALL_EVENT} = true ]; then \
|
||||||
|
curl -L -o /tmp/libevent.tar.gz https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz &&\
|
||||||
|
mkdir -p /tmp/libevent-php &&\
|
||||||
|
tar -C /tmp/libevent-php -zxvf /tmp/libevent.tar.gz --strip 1 &&\
|
||||||
|
cd /tmp/libevent-php &&\
|
||||||
|
./configure --prefix=/usr/local/libevent-2.1.12 &&\
|
||||||
|
make &&\
|
||||||
|
make install &&\
|
||||||
|
rm /tmp/libevent.tar.gz &&\
|
||||||
|
docker-php-ext-install sockets &&\
|
||||||
|
curl -L -o /tmp/event.tar.gz http://pecl.php.net/get/event-3.0.6.tgz &&\
|
||||||
|
mkdir -p /tmp/event-php &&\
|
||||||
|
tar -C /tmp/event-php -zxvf /tmp/event.tar.gz --strip 1 &&\
|
||||||
|
cd /tmp/event-php &&\
|
||||||
|
phpize &&\
|
||||||
|
./configure --with-event-libevent-dir=/usr/local/libevent-2.1.12/ &&\
|
||||||
|
make &&\
|
||||||
|
make install &&\
|
||||||
|
rm /tmp/event.tar.gz &&\
|
||||||
|
docker-php-ext-enable event &&\
|
||||||
|
php -m | grep -q 'event' \
|
||||||
|
;fi
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
# Check PHP version:
|
# Check PHP version:
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
|
@ -508,6 +508,38 @@ RUN set -xe; \
|
||||||
&& docker-php-ext-enable ssdb \
|
&& docker-php-ext-enable ssdb \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
|
||||||
|
############################################################################
|
||||||
|
## Event:
|
||||||
|
############################################################################
|
||||||
|
USER root
|
||||||
|
|
||||||
|
ARG INSTALL_EVENT=false
|
||||||
|
|
||||||
|
RUN set -eux; \
|
||||||
|
if [ ${INSTALL_EVENT} = true ]; then \
|
||||||
|
curl -L -o /tmp/libevent.tar.gz https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz &&\
|
||||||
|
mkdir -p /tmp/libevent-php &&\
|
||||||
|
tar -C /tmp/libevent-php -zxvf /tmp/libevent.tar.gz --strip 1 &&\
|
||||||
|
cd /tmp/libevent-php &&\
|
||||||
|
./configure --prefix=/usr/local/libevent-2.1.12 &&\
|
||||||
|
make &&\
|
||||||
|
make install &&\
|
||||||
|
rm /tmp/libevent.tar.gz &&\
|
||||||
|
docker-php-ext-install sockets &&\
|
||||||
|
curl -L -o /tmp/event.tar.gz http://pecl.php.net/get/event-3.0.6.tgz &&\
|
||||||
|
mkdir -p /tmp/event-php &&\
|
||||||
|
tar -C /tmp/event-php -zxvf /tmp/event.tar.gz --strip 1 &&\
|
||||||
|
cd /tmp/event-php &&\
|
||||||
|
phpize &&\
|
||||||
|
./configure --with-event-libevent-dir=/usr/local/libevent-2.1.12/ &&\
|
||||||
|
make &&\
|
||||||
|
make install &&\
|
||||||
|
rm /tmp/event.tar.gz &&\
|
||||||
|
docker-php-ext-enable event &&\
|
||||||
|
php -m | grep -q 'event' \
|
||||||
|
;fi
|
||||||
|
|
||||||
#
|
#
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
# Optional Supervisord Configuration
|
# Optional Supervisord Configuration
|
||||||
|
|
|
@ -1738,6 +1738,41 @@ RUN if [ ${INSTALL_ZMQ} = true ]; then \
|
||||||
&& ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/zmq.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/20-zmq.ini \
|
&& ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/zmq.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/20-zmq.ini \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
############################################################################
|
||||||
|
## Event:
|
||||||
|
############################################################################
|
||||||
|
USER root
|
||||||
|
|
||||||
|
ARG INSTALL_EVENT=false
|
||||||
|
|
||||||
|
RUN set -eux; \
|
||||||
|
if [ ${INSTALL_EVENT} = true ]; then \
|
||||||
|
curl -L -o /tmp/libevent.tar.gz https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz &&\
|
||||||
|
mkdir -p /tmp/libevent-php &&\
|
||||||
|
tar -C /tmp/libevent-php -zxvf /tmp/libevent.tar.gz --strip 1 &&\
|
||||||
|
cd /tmp/libevent-php &&\
|
||||||
|
./configure --prefix=/usr/local/libevent-2.1.12 &&\
|
||||||
|
make &&\
|
||||||
|
make install &&\
|
||||||
|
rm /tmp/libevent.tar.gz &&\
|
||||||
|
echo "extension=sockets.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/sockets.ini && \
|
||||||
|
ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/sockets.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/20-sockets.ini && \
|
||||||
|
curl -L -o /tmp/event.tar.gz http://pecl.php.net/get/event-3.0.6.tgz &&\
|
||||||
|
mkdir -p /tmp/event-php &&\
|
||||||
|
tar -C /tmp/event-php -zxvf /tmp/event.tar.gz --strip 1 &&\
|
||||||
|
cd /tmp/event-php &&\
|
||||||
|
phpize &&\
|
||||||
|
./configure --with-event-libevent-dir=/usr/local/libevent-2.1.12/ &&\
|
||||||
|
make &&\
|
||||||
|
make install &&\
|
||||||
|
rm /tmp/event.tar.gz &&\
|
||||||
|
echo "extension=event.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/event.ini && \
|
||||||
|
ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/event.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/20-event.ini && \
|
||||||
|
php -m | grep -q 'event' \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
# Final Touch
|
# Final Touch
|
||||||
|
|
Loading…
Reference in New Issue