[Docker] Support multiple PHP versions for xdebug + blackfire images (#5760)

This commit is contained in:
Jan Mikeš 2021-03-03 18:48:43 +01:00 committed by GitHub
parent c1dab30664
commit 124a13dde8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 3 deletions

View File

@ -2,7 +2,9 @@
## Docker image used for profiling Rector ##
################################################
FROM rector/rector:latest
ARG PHP_VERSION=8.0
FROM rector/rector:php${PHP_VERSION}
# Install php extensions
RUN apt-get update && apt-get install -y \

View File

@ -8,6 +8,8 @@ Builds image with `rector-blackfire` tag.
docker build . --tag rector-blackfire --file .docker/php-blackfire/Dockerfile
```
You can use `--build-arg PHP_VERSION=7.4` to build with specific PHP version. Supported versions are: 7.3, 7.4, 8.0
### Prepare

View File

@ -2,9 +2,9 @@
## Docker image used for debugging Rector ##
################################################
ARG RECTOR_IMAGE="rector"
ARG PHP_VERSION=8.0
FROM rector/${RECTOR_IMAGE}:latest
FROM rector/rector:php${PHP_VERSION}
RUN pecl install xdebug

View File

@ -8,6 +8,8 @@ Builds image with `rector-xdebug` tag.
docker build . --tag rector-xdebug --file .docker/php-xdebug/Dockerfile
```
You can use `--build-arg PHP_VERSION=7.4` to build with specific PHP version. Supported versions are: 7.3, 7.4, 8.0
### Usage
Get into container (change ip address):