对于这个作曲家包,我需要将 xmlreader 放入我的自定义 docker php 图像中:
FROM php:7.2-fpm-alpine
RUN apk add --update libzip-dev libmcrypt-dev libpng-dev libjpeg-turbo-dev libxml2-dev icu-dev postgresql-dev curl-dev libmemcached-dev &&\
apk add --update --virtual build-dependencies build-base gcc wget autoconf &&\
docker-php-ext-install gd && \
docker-php-ext-install zip &&\
docker-php-ext-install dom xml xmlwriter xmlreader &&\
apk del build-dependencies &&\
rm -rf /var/cache/apk/*
但是当我构建它时,我收到以下错误:
/usr/src/php/ext/xmlreader/php_xmlreader.c:32:10: fatal error: ext/dom/dom_ce.h: No such file or directory
#include "ext/dom/dom_ce.h"
^~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:194: php_xmlreader.lo] Error 1
Removing intermediate container 0b3f031b2479
所以我假设我错过了一些图书馆,但我错过了哪一个?
显然dom也需要的扩展是通过安装docker-php-ext-install的,我也安装了reqwuired libxml2-dev。
幕布斯6054654