Merge pull request #2938 from laradock/ci-build-with-php-worker

feat(CI build failed): php-worker
This commit is contained in:
Shao Yu-Lung (Allen) 2021-04-07 07:58:05 +08:00 committed by GitHub
commit 5dfa4e7d41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 37 additions and 21 deletions

View File

@ -23,9 +23,9 @@ jobs:
PHP_VERSION: ${{ matrix.php_version }} PHP_VERSION: ${{ matrix.php_version }}
run: | run: |
cp env-example .env cp env-example .env
sed -i -- '99,278s/=false/=true/g' .env sed -i -- '99,313s/=false/=true/g' .env
sed -i -- 's/GNUPG=false/GNUPG=true/g' .env
sed -i -- 's/CHANGE_SOURCE=true/CHANGE_SOURCE=false/g' .env sed -i -- 's/CHANGE_SOURCE=true/CHANGE_SOURCE=false/g' .env
sed -i -- 's/GNUPG=false/GNUPG=true/g' .env
sed -i -- 's/PHPDBG=true/PHPDBG=false/g' .env sed -i -- 's/PHPDBG=true/PHPDBG=false/g' .env
sed -i -- 's/CASSANDRA=true/CASSANDRA=false/g' .env sed -i -- 's/CASSANDRA=true/CASSANDRA=false/g' .env
sed -i -- 's/GEARMAN=true/GEARMAN=false/g' .env sed -i -- 's/GEARMAN=true/GEARMAN=false/g' .env

View File

@ -32,15 +32,17 @@ RUN apk --update add wget \
cyrus-sasl-dev \ cyrus-sasl-dev \
libgsasl-dev \ libgsasl-dev \
oniguruma-dev \ oniguruma-dev \
openssl \ libressl \
openssl-dev \ libressl-dev \
supervisor supervisor
RUN docker-php-ext-install mysqli mbstring pdo pdo_mysql tokenizer xml pcntl RUN pecl channel-update pecl.php.net; \
docker-php-ext-install mysqli mbstring pdo pdo_mysql tokenizer xml pcntl
RUN if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \ RUN if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
pecl channel-update pecl.php.net && pecl install memcached-2.2.0 mcrypt-1.0.1 && docker-php-ext-enable memcached \ pecl install memcached-2.2.0 mcrypt-1.0.1 && docker-php-ext-enable memcached \
;else \ ;else \
pecl channel-update pecl.php.net && pecl install memcached mcrypt-1.0.1 && docker-php-ext-enable memcached \ pecl install memcached mcrypt-1.0.1 && docker-php-ext-enable memcached \
;fi ;fi
# Add a non-root user: # Add a non-root user:
@ -79,9 +81,13 @@ RUN set -eux; if [ ${INSTALL_GNUPG} = true ]; then \
#Install GD package: #Install GD package:
ARG INSTALL_GD=false ARG INSTALL_GD=false
RUN if [ ${INSTALL_GD} = true ]; then \ RUN if [ ${INSTALL_GD} = true ]; then \
apk add --update --no-cache freetype-dev libjpeg-turbo-dev jpeg-dev libpng-dev; \ apk add --update --no-cache freetype-dev libjpeg-turbo-dev jpeg-dev libpng-dev; \
docker-php-ext-configure gd --with-freetype-dir=/usr/lib/ --with-jpeg-dir=/usr/lib/ --with-png-dir=/usr/lib/ && \ if [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ] && [ $(php -r "echo PHP_MINOR_VERSION;") = "4" ]; then \
docker-php-ext-install gd \ docker-php-ext-configure gd --with-freetype --with-jpeg --with-png; \
else \
docker-php-ext-configure gd --with-freetype-dir=/usr/lib/ --with-jpeg-dir=/usr/lib/ --with-png-dir=/usr/lib/; \
fi; \
docker-php-ext-install gd \
;fi ;fi
#Install ImageMagick: #Install ImageMagick:
@ -92,7 +98,6 @@ RUN set -eux; \
if [ ${INSTALL_IMAGEMAGICK} = true ]; then \ if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
apk add --update --no-cache imagemagick-dev; \ apk add --update --no-cache imagemagick-dev; \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ]; then \ if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ]; then \
apk add --update --no-cache git && \
cd /tmp && \ cd /tmp && \
if [ ${IMAGEMAGICK_VERSION} = "latest" ]; then \ if [ ${IMAGEMAGICK_VERSION} = "latest" ]; then \
git clone https://github.com/Imagick/imagick; \ git clone https://github.com/Imagick/imagick; \
@ -247,7 +252,6 @@ RUN if [ ${INSTALL_AUDIOWAVEFORM} = true ]; then \
ARG INSTALL_AMQP=false ARG INSTALL_AMQP=false
RUN if [ ${INSTALL_AMQP} = true ]; then \ RUN if [ ${INSTALL_AMQP} = true ]; then \
apk del -q openssl openssl-dev && \
apk --update add -q rabbitmq-c rabbitmq-c-dev && \ apk --update add -q rabbitmq-c rabbitmq-c-dev && \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ]; then \ if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ]; then \
printf "\n" | pecl install amqp-1.11.0beta; \ printf "\n" | pecl install amqp-1.11.0beta; \
@ -256,7 +260,6 @@ RUN if [ ${INSTALL_AMQP} = true ]; then \
fi && \ fi && \
docker-php-ext-enable amqp && \ docker-php-ext-enable amqp && \
apk del -q rabbitmq-c-dev && \ apk del -q rabbitmq-c-dev && \
apk add --update -q openssl openssl-dev && \
docker-php-ext-install sockets \ docker-php-ext-install sockets \
;fi ;fi
@ -324,9 +327,13 @@ RUN if [ $INSTALL_GHOSTSCRIPT = true ]; then \
ARG INSTALL_REDIS=false ARG INSTALL_REDIS=false
RUN if [ ${INSTALL_REDIS} = true ]; then \ RUN if [ ${INSTALL_REDIS} = true ]; then \
# Install Redis Extension # Install Redis Extension
printf "\n" | pecl install -o -f redis \ if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
&& rm -rf /tmp/pear \ printf "\n" | pecl install -o -f redis-4.3.0; \
&& docker-php-ext-enable redis \ else \
printf "\n" | pecl install -o -f redis; \
fi; \
rm -rf /tmp/pear; \
docker-php-ext-enable redis \
;fi ;fi
########################################################################### ###########################################################################
@ -360,8 +367,11 @@ RUN if [ ${INSTALL_TAINT} = true ]; then \
# Install Php TAINT Extension # Install Php TAINT Extension
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ]; then \ if [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ]; then \
pecl install taint; \ pecl install taint; \
fi && \ docker-php-ext-enable taint; \
docker-php-ext-enable taint \ php -m | grep -q 'taint'; \
else \
echo 'taint not Support'; \
fi \
;fi ;fi
########################################################################### ###########################################################################
@ -371,7 +381,7 @@ RUN if [ ${INSTALL_TAINT} = true ]; then \
ARG INSTALL_IMAP=false ARG INSTALL_IMAP=false
RUN if [ ${INSTALL_IMAP} = true ]; then \ RUN if [ ${INSTALL_IMAP} = true ]; then \
apk add --update imap-dev openssl-dev && \ apk add --update imap-dev && \
docker-php-ext-configure imap --with-imap --with-imap-ssl && \ docker-php-ext-configure imap --with-imap --with-imap-ssl && \
docker-php-ext-install imap \ docker-php-ext-install imap \
;fi ;fi
@ -383,8 +393,14 @@ RUN if [ ${INSTALL_IMAP} = true ]; then \
ARG INSTALL_XMLRPC=false ARG INSTALL_XMLRPC=false
RUN if [ ${INSTALL_XMLRPC} = true ]; then \ RUN if [ ${INSTALL_XMLRPC} = true ]; then \
docker-php-ext-install xmlrpc \ if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ]; then \
;fi pecl install xmlrpc-1.0.0RC2; \
docker-php-ext-enable xmlrpc; \
else \
docker-php-ext-install xmlrpc; \
fi; \
php -m | grep -r 'xmlrpc'; \
fi
# #
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------