FROM php:8.2.13-cli-alpine3.18@sha256:bc920d642c7ced77868277f93d0ed6182ba1abd75d483da4663ca2cc11aeb328 RUN set -ex \ && apk update \ && apk add --no-cache postgresql-dev \ && apk add --no-cache --virtual .build-requirements $PHPIZE_DEPS linux-headers curl-dev \ && docker-php-ext-install sockets \ && docker-php-source extract # swoole extension RUN mkdir /usr/src/php/ext/swoole \ && curl -sfL https://github.com/swoole/swoole-src/archive/v5.0.3.tar.gz -o swoole.tar.gz \ && tar xfz swoole.tar.gz --strip-components=1 -C /usr/src/php/ext/swoole \ && docker-php-ext-configure swoole --enable-swoole-pgsql --enable-openssl --enable-sockets --enable-swoole-curl \ && docker-php-ext-install -j$(nproc) swoole \ && rm -f swoole.tar.gz $HOME/.composer/*-old.phar RUN docker-php-source delete \ && apk del .build-requirements # xdebug extension RUN apk add --no-cache --update --virtual build-requirements linux-headers $PHPIZE_DEPS \ && pecl install xdebug \ && docker-php-ext-enable xdebug \ && apk del build-requirements \ && rm -rf /usr/src/php*