enable xdebug on integration test imagae
This commit is contained in:
parent
04b0e69af6
commit
515f79fd9c
2 changed files with 14 additions and 1 deletions
13
Dockerfile
13
Dockerfile
|
@ -11,7 +11,18 @@ RUN apk update \
|
|||
|
||||
RUN docker-php-ext-install mysqli
|
||||
|
||||
# Install Composer
|
||||
# Install Xdebug
|
||||
RUN apk add --no-cache $PHPIZE_DEPS \
|
||||
&& apk add --update linux-headers \
|
||||
&& pecl install xdebug \
|
||||
&& docker-php-ext-enable xdebug \
|
||||
&& apk del --purge $PHPIZE_DEPS \
|
||||
&& echo "xdebug.start_with_request=yes" >> /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 \
|
||||
&& echo "xdebug.mode=debug" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
|
||||
&& echo "xdebug.idekey=VSCODE" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
|
||||
|
||||
# Install Composer
|
||||
RUN EXPECTED_CHECKSUM=$(curl -s https://composer.github.io/installer.sig) \
|
||||
&& curl https://getcomposer.org/installer -o composer-setup.php \
|
||||
&& ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" \
|
||||
|
|
|
@ -29,3 +29,5 @@ services:
|
|||
volumes:
|
||||
- .:/app
|
||||
command: ["composer", "run-script", "test"]
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
|
Loading…
Reference in a new issue