docker-thinkphp5
docker-thinkphp5 copied to clipboard
No valid packages found
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update pecl/swoole requires PHP (version >= 7.1.0), installed version is 7.0.33 No valid packages found install failed ERROR: Service 'php' failed to build: The command '/bin/sh -c apt install -y nghttp2 openssl libssl-dev libpcre3-dev && pecl install swoole' returned a non-zero code: 1
1.need upgrade the php version in services/php/Dockerfile, it's mine:
FROM php:7.3.28-fpm-stretch
2.need install some packages it will say " libzip not found..." when you rebuild . then add one line like this:
(33 line)
&& apt-get install -y zlib1g-dev libzip-dev \
&& docker-php-ext-install zip \
3.need upgrade xdebug
download https://github.com/xdebug/xdebug/archive/refs/tags/3.0.4.tar.gz
put it in services/php/ext/xdebug-3.0.4.tar.gz
update 117 line like this:
COPY ./ext/xdebug-3.0.4.tar.gz /tmp/xdebug.tgz
4.need update the services/composer/Dockerfile it will say " WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.13/main: Permission denied " so, add two line command , like this:
(2-3 line)
FROM composer:latest
RUN sed -i 's/https/http/' /etc/apk/repositories
RUN apk add curl
RUN docker-php-ext-install pdo_mysql \
&& docker-php-ext-install mysqli