FROM composer:2.2.24 as composer FROM php:8.1-fpm-bookworm COPY --from=composer /usr/bin/composer /usr/bin # 安装 zip 扩展,composer 下载依赖需要 # 不同版本的 php 的 docker 容器安装扩展的方式不同, 具体请查看 https://hub.docker.com/_/php 和查阅相关资料 RUN sed -i "s@http://deb.debian.org/debian@http://mirrors.cloud.tencent.com/debian@g" /etc/apt/sources.list.d/debian.sources && \ apt-get update && \ apt-get install -y \ libzip-dev \ zip && \ rm -rf /var/lib/apt/lists/* && \ docker-php-ext-install zip # composer 安装依赖 RUN composer config -g repo.packagist composer https://mirrors.cloud.tencent.com/composer/ && \ composer require guzzlehttp/guzzle