chore(docker): switch to mlocati's PHP extension installer
The docker-php-ext-install command can have permission issues on some remote servers when extracting tarballs. Using mlocati/docker-php-extension-installer provides a more reliable method for installing PHP extensions in Docker containers.
This commit is contained in:
11
Dockerfile
11
Dockerfile
@@ -15,12 +15,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 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
|
||||
|
||||
@@ -37,4 +40,4 @@ USER www-data
|
||||
# Expose port 8000
|
||||
EXPOSE 8000
|
||||
|
||||
CMD ["php", "artisan", "serve", "--host=0.0.0.0", "--port=8000"]
|
||||
CMD ["php", "artisan", "serve", "--host=0.0.0.0", "--port=8000"]
|
||||
Reference in New Issue
Block a user