ci(Docker): add --cleanup flag to install-php-extensions

Add the --cleanup flag to the install-php-extensions command to remove downloaded archives after installation, reducing the final image size.

Use the --no-cache flag for the remote podman build in the deployment script to ensure a clean build from the latest source on the server.
This commit is contained in:
Jp
2026-02-26 11:36:50 +08:00
parent cea2749252
commit fea727daf4
2 changed files with 2 additions and 2 deletions

View File

@@ -19,7 +19,7 @@ RUN apt-get update && apt-get install -y \
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN chmod +x /usr/local/bin/install-php-extensions && \
install-php-extensions pdo_mysql mbstring exif pcntl bcmath gd zip intl
install-php-extensions --cleanup pdo_mysql mbstring exif pcntl bcmath gd zip intl
# Clear cache
RUN apt-get clean && rm -rf /var/lib/apt/lists/*