Skip to content

Commit 06e3ef1

Browse files
committed
Add php extensions
1 parent d0e6d9b commit 06e3ef1

File tree

1 file changed

+6
-16
lines changed

1 file changed

+6
-16
lines changed

Dockerfile

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,13 @@ RUN apk add --no-cache libstdc++ libgcc jq git curl unzip sshpass openssh-client
77
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --2.2
88

99
# Install PHP extensions
10-
RUN apk add \
11-
bzip2-dev \
12-
libsodium-dev \
13-
libxml2-dev \
14-
libxslt-dev \
15-
linux-headers \
16-
yaml-dev
10+
RUN apk add --no-cache \
11+
# Install dependencies for PHP extensions
12+
oniguruma-dev icu-dev libxml2-dev libpng-dev libjpeg-turbo-dev freetype-dev libxslt-dev \
13+
libzip-dev zip zlib-dev libmcrypt-dev gmp-dev libintl
1714

18-
ENV CFLAGS="$CFLAGS -D_GNU_SOURCE"
19-
20-
21-
docker-php-ext-install -j$(nproc) \
15+
RUN docker-php-ext-configure gd --with-freetype --with-jpeg \
16+
&& docker-php-ext-install -j$(nproc) \
2217
bcmath \
2318
ctype \
2419
dom \
@@ -36,11 +31,6 @@ docker-php-ext-install -j$(nproc) \
3631
sockets \
3732
&& docker-php-ext-enable bcmath ctype dom fileinfo gd intl mbstring opcache pcntl pdo_mysql simplexml soap xsl zip sockets
3833

39-
RUN apk add --virtual build-deps autoconf gcc make g++ zlib-dev \
40-
&& pecl channel-update pecl.php.net \
41-
&& pecl install yaml-2.2.3 && docker-php-ext-enable yaml \
42-
&& apk del build-deps
43-
4434
COPY --from=node /usr/local/lib/node_modules /usr/local/lib/node_modules
4535
COPY --from=node /usr/local/include/node /usr/local/include/node
4636
COPY --from=node /usr/local/share/man/man1/node.1 /usr/local/share/man/man1/node.1

0 commit comments

Comments
 (0)