-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
90 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
ARG PHP_VERSION | ||
|
||
FROM php:${PHP_VERSION}-cli-alpine AS php | ||
|
||
WORKDIR /app | ||
|
||
RUN set -eux; \ | ||
apk add --no-cache --virtual .build-deps \ | ||
$PHPIZE_DEPS \ | ||
linux-headers \ | ||
; \ | ||
\ | ||
pecl install xdebug; \ | ||
docker-php-ext-enable xdebug; \ | ||
pecl clear-cache; \ | ||
runDeps="$( \ | ||
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \ | ||
| tr ',' '\n' \ | ||
| sort -u \ | ||
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ | ||
)"; \ | ||
apk add --no-cache --virtual .app-phpexts-rundeps $runDeps; \ | ||
\ | ||
apk del .build-deps | ||
|
||
|
||
# https://getcomposer.org/doc/03-cli.md#composer-allow-superuser | ||
ENV COMPOSER_ALLOW_SUPERUSER=1 | ||
ENV PATH="${PATH}:/root/.composer/vendor/bin" | ||
|
||
COPY --from=composer/composer:2-bin --link /composer /usr/bin/composer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
x-params: | ||
- &common | ||
environment: | ||
XDEBUG_MODE: coverage | ||
volumes: | ||
- ./:/app | ||
command: | ||
- sh | ||
- -c | ||
- 'rm -f composer.lock && rm -rf tests/Bundle/App/var/cache && composer install && vendor/bin/simple-phpunit --coverage-text' | ||
|
||
# To run test just exec e.g. 'docker compose run --rm php8.1' | ||
services: | ||
php8.1: | ||
build: | ||
context: . | ||
target: php | ||
args: | ||
PHP_VERSION: 8.1 | ||
<<: *common | ||
|
||
php8.2: | ||
build: | ||
context: . | ||
target: php | ||
args: | ||
PHP_VERSION: 8.2 | ||
<<: *common | ||
|
||
php8.3: | ||
build: | ||
context: . | ||
target: php | ||
args: | ||
PHP_VERSION: 8.3 | ||
<<: *common |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters