xxxxxxxxxx
# Use an official PHP image
FROM php:7.4-cli
# Install Xdebug
RUN pecl install xdebug && docker-php-ext-enable xdebug
# Set the xdebug configuration
RUN echo "xdebug.remote_enable=on" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN echo "xdebug.remote_autostart=off" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
# Copy your PHP application code into the container
COPY . /app
# Set the working directory
WORKDIR /app