在php:php fpm docker映像中启用php模块
我如何在docker官方图片中启用PHP模块?无法安装在php:php fpm docker映像中启用php模块,php,docker,Php,Docker,我如何在docker官方图片中启用PHP模块?无法安装php zip,例如: root@122f1612f817:/var/www/html# apt-cache policy php-zip php-zip: Installed: (none) Candidate: (none) Version table: 2:7.3+69 -1 500 http://deb.debian.org/debian buster/main amd64 Packages root@122
php zip
,例如:
root@122f1612f817:/var/www/html# apt-cache policy php-zip
php-zip:
Installed: (none)
Candidate: (none)
Version table:
2:7.3+69 -1
500 http://deb.debian.org/debian buster/main amd64 Packages
root@122f1612f817:/var/www/html# apt-get install php-zip
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package php-zip is a virtual package provided by:
php7.3-zip 7.3.4-2 [Not candidate version]
E: Package 'php-zip' has no installation candidate
您可以将其安装为PHP扩展,因为从日志中可以看出,它在repo中不可用
FROM php:7.2-fpm
RUN apt-get update
RUN apt-get install libzip-dev -y
RUN docker-php-ext-configure zip --with-libzip \
&& docker-php-ext-install zip
将行添加到Dockerfile
RUN apt-get install php-zip -y
你能试试“zip”而不是“php-zip”吗?