34 lines
1.4 KiB
Docker
34 lines
1.4 KiB
Docker
FROM composer AS composer
|
|
FROM php:8.2-cli-alpine
|
|
COPY --from=composer /usr/bin/composer /usr/bin/composer
|
|
RUN apk add --no-cache bash nodejs npm bash
|
|
RUN apk --no-cache add pcre-dev ${PHPIZE_DEPS} \
|
|
&& pecl install redis && docker-php-ext-enable redis \
|
|
&& docker-php-ext-install mysqli pdo pdo_mysql \
|
|
&& apk del pcre-dev ${PHPIZE_DEPS}
|
|
|
|
RUN apk add --update --no-cache \
|
|
strace git make vim curl wget
|
|
|
|
RUN sed -e 's;/bin/ash$;/bin/bash;g' -i /etc/passwd
|
|
|
|
RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS \
|
|
&& apk add --no-cache --update linux-headers \
|
|
&& pecl install xdebug \
|
|
&& docker-php-ext-enable xdebug \
|
|
&& apk del -f .build-deps
|
|
|
|
RUN echo "xdebug.start_with_request=yes" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
|
|
&& echo "xdebug.mode=debug" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
|
|
&& echo "xdebug.log=/var/www/html/xdebug/xdebug.log" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
|
|
&& echo "xdebug.discover_client_host=1" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
|
|
&& echo "xdebug.client_port=9000" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
|
|
&& echo "xdebug.client_host=host.docker.internal" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
|
|
|
|
COPY ./custom.ini /usr/local/etc/php/conf.d/custom.ini
|
|
COPY ./.bashrc /root/.bashrc
|
|
|
|
WORKDIR "/var/www"
|
|
CMD ["php"]
|
|
|