jguyomard / docker-laravel

:whale: Docker Images for Laravel development
MIT License
109 stars 62 forks source link

PHPUnit/XDebug support #13

Open karllhughes opened 6 years ago

karllhughes commented 6 years ago

I use this image as a base image for many projects, but it doesn't include PHPUnit or XDebug.

I don't think the core image should, but what do you think about adding another folder for a development version of the image? Right now I'm just extending this image like this:

FROM jguyomard/laravel-php:7.2

RUN curl https://phar.phpunit.de/phpunit-7.0.phar -L -o phpunit.phar && \
    chmod +x phpunit.phar && mv phpunit.phar /usr/local/bin/phpunit && \
    apk add --no-cache $PHPIZE_DEPS && \
    pecl install xdebug-2.6.1 && \
    docker-php-ext-enable xdebug

CMD phpunit

Just a thought. I don't mind maintaining my own image, just figured others might want PHPUnit and XDebug as well.