From a6971001038579730eab31823a60123d06267d50 Mon Sep 17 00:00:00 2001 From: Jp Date: Wed, 25 Feb 2026 22:43:35 +0800 Subject: [PATCH] chore(docker): ignore CI directories and use extension installer - Add .github and .circleci to .dockerignore to reduce image size - Replace docker-php-ext-install with mlocati's extension installer for better reliability and maintenance --- .dockerignore | 2 ++ Dockerfile | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.dockerignore b/.dockerignore index 0fc32aa..5e90e26 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,4 +1,6 @@ .git +.github +.circleci .env node_modules vendor diff --git a/Dockerfile b/Dockerfile index f37f0d7..37a962c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,12 +12,15 @@ RUN apt-get update && apt-get install -y \ libzip-dev \ libicu-dev +# Install PHP extensions installer +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 + # Clear cache RUN apt-get clean && rm -rf /var/lib/apt/lists/* -# Install PHP extensions -RUN docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd zip intl - # Get latest Composer COPY --from=composer:latest /usr/bin/composer /usr/bin/composer