From 8e3913bda88a59c5acbcecf4ad0ce7a8db6b85b8 Mon Sep 17 00:00:00 2001 From: Jp Date: Thu, 26 Feb 2026 11:44:16 +0800 Subject: [PATCH] fix(Dockerfile): replace php extension installer with docker-php-ext-install The third-party extension installer (mlocati/docker-php-extension-installer) was causing tar permission issues on the remote server. Using the standard `docker-php-ext-install` method resolves this compatibility problem. --- Dockerfile | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7e93276..e1ce701 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,15 +15,12 @@ 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 --cleanup pdo_mysql mbstring exif pcntl bcmath gd zip intl - # Clear cache RUN apt-get clean && rm -rf /var/lib/apt/lists/* +# Install PHP extensions using standard method to avoid tar permission issues on remote server +RUN docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd zip intl + # Get latest Composer COPY --from=docker.io/library/composer:latest /usr/bin/composer /usr/bin/composer @@ -40,4 +37,4 @@ USER www-data # Expose port 8000 EXPOSE 8000 -CMD ["php", "artisan", "serve", "--host=0.0.0.0", "--port=8000"] \ No newline at end of file +CMD ["php", "artisan", "serve", "--host=0.0.0.0", "--port=8000"]