FROM php:8.2-fpm-bookworm RUN rm -rf /etc/apt/sources.list.d/* \ && echo "deb http://mirrors.ustc.edu.cn/debian/ bookworm main contrib non-free non-free-firmware" > /etc/apt/sources.list \ && echo "deb http://mirrors.ustc.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware" >> /etc/apt/sources.list \ && echo "deb http://mirrors.ustc.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware" >> /etc/apt/sources.list RUN apt-get update # 安装 nginx RUN apt-get install -y nginx ADD --chmod=0755 https://nexus.hl7.top:1243/repository/github-raw-proxy/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ # 配置代理 RUN sed -i 's|aomedia.googlesource.com|nexus.hl7.top:1243/repository/raw-aomedia.googlesource.com|g' /usr/local/bin/install-php-extensions RUN sed -i 's|chromium.googlesource.com|nexus.hl7.top:1243/repository/raw-chromium.googlesource.com|g' /usr/local/bin/install-php-extensions RUN sed -i 's|https://github.com|https://nexus.hl7.top:1243/repository/github-raw-proxy|g' /usr/local/bin/install-php-extensions RUN install-php-extensions pdo_mysql RUN install-php-extensions gd RUN install-php-extensions fileinfo RUN install-php-extensions opcache RUN install-php-extensions redis RUN install-php-extensions event RUN install-php-extensions imagick RUN install-php-extensions zip RUN install-php-extensions pcntl # 清理默认 Nginx 配置 RUN rm /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default # 安装 Composer COPY --from=composer:2 /usr/bin/composer /usr/local/bin/composer RUN chmod +x /usr/local/bin/composer RUN composer config -g repos.packagist composer https://nexus.hl7.top:1243/repository/composer-proxy/ # 设置工作目录 WORKDIR /var/www/html