File tree Expand file tree Collapse file tree 1 file changed +20
-5
lines changed Expand file tree Collapse file tree 1 file changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ FROM php:8.2-fpm-alpine
33# Set working directory
44WORKDIR /var/www
55
6- # Install system dependencies
6+ # Install system dependencies and dev packages
77RUN apk add --no-cache \
88 git \
99 curl \
@@ -13,16 +13,31 @@ RUN apk add --no-cache \
1313 unzip \
1414 mysql-client \
1515 supervisor \
16- nginx
16+ nginx \
17+ freetype-dev \
18+ libjpeg-turbo-dev \
19+ libwebp-dev \
20+ zlib-dev \
21+ libxpm-dev \
22+ oniguruma-dev
1723
18- # Clear cache
19- RUN rm -rf /var/cache/apk/*
24+ # Configure GD extension
25+ RUN docker-php-ext-configure gd \
26+ --with-freetype \
27+ --with-jpeg \
28+ --with-webp
2029
2130# Install PHP extensions
2231RUN docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd xml
2332
33+ # Clear cache
34+ RUN rm -rf /var/cache/apk/*
35+
2436# Install Redis extension
25- RUN pecl install redis && docker-php-ext-enable redis
37+ RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS \
38+ && pecl install redis \
39+ && docker-php-ext-enable redis \
40+ && apk del .build-deps
2641
2742# Install Composer
2843COPY --from=composer:2.7 /usr/bin/composer /usr/bin/composer
You can’t perform that action at this time.
0 commit comments