PHP soap 扩展不适用于 php 8 alpine with Dockerfile

PHP soap extension dont work with php 8 alpine with Dockerfile

我尝试 运行 作曲家安装,但我没有 soap 扩展名:

Your lock file does not contain a compatible set of packages. Please run composer update.
    
Problem 1
   - Root composer.json requires PHP extension ext-soap * but it is missing from your system. Install or enable PHP's soap extension.
    
To enable extensions, verify that they are enabled in your .ini files:
   - /usr/local/etc/php/php.ini
   - /usr/local/etc/php/conf.d/docker-php-ext-intl.ini
   - /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini
   - /usr/local/etc/php/conf.d/docker-php-ext-pdo_mysql.ini
   - /usr/local/etc/php/conf.d/docker-php-ext-pdo_pgsql.ini
   - /usr/local/etc/php/conf.d/docker-php-ext-sodium.ini

我的 Dockerfile 部分:

    FROM php:8.0-fpm-alpine
    RUN set -eux; \
        apk update; \
        apk add php-soap; \

    RUN apk add --no-cache postgresql-dev; \
        docker-php-ext-install soap; \
        docker-php-ext-enable soap; \

我在构建 docker-compose 时没有遇到任何错误。其他扩展没问题。只有 soap 个有问题。

我也尝试 FROM php:8.0-fpm-alpine3.15 和其他扩展名,例如 php8-soap/php-soap.

我也试过使用 https://github.com/codecasts/php-alpine - 没有效果

工作版本:

FROM php:8.0-fpm-alpine3.15

RUN set -eux; \
    apk update; \
    apk add libxml2-dev; \
    apk add php8-soap; \


RUN apk add --no-cache postgresql-dev; \
    docker-php-ext-install soap; \
    docker-php-ext-enable soap; \