mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-01 17:00:51 +00:00
cleanup Docker metafiles, not used anymore
This commit is contained in:
parent
883dd9f677
commit
9be64004c0
|
@ -1,27 +0,0 @@
|
|||
################################################
|
||||
## Docker image used for profiling Rector ##
|
||||
################################################
|
||||
|
||||
ARG PHP_VERSION=8.0
|
||||
|
||||
FROM rector/rector:php${PHP_VERSION}
|
||||
|
||||
# Install php extensions
|
||||
RUN apt-get update && apt-get install -y \
|
||||
wget \
|
||||
gnupg2
|
||||
|
||||
# Setup blackfire repo
|
||||
RUN wget -q -O - https://packages.blackfire.io/gpg.key | apt-key add -
|
||||
RUN echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list
|
||||
|
||||
# Install blackfire php extensions
|
||||
RUN apt-get update && apt-get install -y \
|
||||
blackfire-php
|
||||
|
||||
# Install blackfire cli tool
|
||||
RUN mkdir -p /tmp/blackfire \
|
||||
&& architecture=$(case $(uname -m) in i386 | i686 | x86) echo "i386" ;; x86_64 | amd64) echo "amd64" ;; aarch64 | arm64 | armv8) echo "arm64" ;; *) echo "amd64" ;; esac) \
|
||||
&& curl -A "Docker" -L https://blackfire.io/api/v1/releases/client/linux/$architecture | tar zxp -C /tmp/blackfire \
|
||||
&& mv /tmp/blackfire/blackfire /usr/bin/blackfire \
|
||||
&& rm -Rf /tmp/blackfire
|
|
@ -1,34 +0,0 @@
|
|||
## Docker image for Blackfire profiling
|
||||
|
||||
### Build
|
||||
|
||||
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
|
||||
|
||||
These variables must be set on host to pass them into container (obtain values at [blackfire.io](https://blackfire.io)):
|
||||
```
|
||||
export BLACKFIRE_CLIENT_ID=""
|
||||
export BLACKFIRE_CLIENT_TOKEN=""
|
||||
```
|
||||
|
||||
|
||||
### Usage
|
||||
|
||||
Get into container:
|
||||
|
||||
```
|
||||
docker run --entrypoint="" -it --rm -e BLACKFIRE_CLIENT_ID -e BLACKFIRE_CLIENT_TOKEN -v $(pwd):/rector rector-blackfire bash
|
||||
```
|
||||
|
||||
Once in container, you can start profiling:
|
||||
```
|
||||
blackfire run php bin/rector <args..>
|
||||
```
|
|
@ -1,11 +0,0 @@
|
|||
################################################
|
||||
## Docker image used for debugging Rector ##
|
||||
################################################
|
||||
|
||||
ARG PHP_VERSION=8.0
|
||||
|
||||
FROM rector/rector:php${PHP_VERSION}
|
||||
|
||||
RUN pecl install xdebug
|
||||
|
||||
COPY .docker/php-xdebug/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
|
|
@ -1,26 +0,0 @@
|
|||
## Docker image for Xdebug debugging
|
||||
|
||||
### Build
|
||||
|
||||
Builds image with `rector-xdebug` tag.
|
||||
|
||||
```shell
|
||||
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):
|
||||
|
||||
```shell
|
||||
docker run -it --rm \
|
||||
--entrypoint="" \
|
||||
--volume $(pwd):/rector \
|
||||
--env XDEBUG_CONFIG="client_host=172.16.165.1" \
|
||||
--env PHP_IDE_CONFIG="serverName=rector" \
|
||||
rector-xdebug bash
|
||||
```
|
||||
|
||||
**Do not forget to run rector binary with `--xdebug` option.**
|
|
@ -1,5 +0,0 @@
|
|||
[xdebug]
|
||||
zend_extension = "/usr/local/lib/php/extensions/no-debug-non-zts-20200930/xdebug.so"
|
||||
xdebug.mode = debug
|
||||
xdebug.client_port = 9003
|
||||
xdebug.start_with_request = yes
|
|
@ -1,10 +0,0 @@
|
|||
[opcache]
|
||||
opcache.memory_consumption=128
|
||||
opcache.interned_strings_buffer=8
|
||||
opcache.max_accelerated_files=4000
|
||||
opcache.revalidate_freq=60
|
||||
opcache.fast_shutdown=1
|
||||
opcache.enable_cli=1
|
||||
opcache.enable=1
|
||||
opcache.file_cache='/tmp/opcache'
|
||||
opcache.file_update_protection=0
|
|
@ -1,28 +0,0 @@
|
|||
*~
|
||||
.DS_Store
|
||||
.idea/
|
||||
|
||||
.env
|
||||
.editorconfig
|
||||
.phpstorm.meta.php
|
||||
|
||||
phpstan.neon
|
||||
rector.php
|
||||
phpunit.xml
|
||||
ecs.php
|
||||
|
||||
LICENSE
|
||||
|
||||
.gitattributes
|
||||
.gitignore
|
||||
|
||||
*.md
|
||||
|
||||
.dockerignore
|
||||
Dockerfile
|
||||
docker-compose.yml
|
||||
docker-compose.dist.yml
|
||||
|
||||
/docs
|
||||
|
||||
*.phar
|
58
Dockerfile
58
Dockerfile
|
@ -1,58 +0,0 @@
|
|||
ARG PHP_VERSION=8.0
|
||||
FROM php:${PHP_VERSION}-cli as base
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libzip4 \
|
||||
libicu63 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
FROM base as build
|
||||
|
||||
WORKDIR /rector
|
||||
|
||||
# Install php extensions
|
||||
RUN apt-get update && apt-get install -y \
|
||||
g++ \
|
||||
git \
|
||||
libicu-dev \
|
||||
libzip-dev \
|
||||
unzip \
|
||||
wget \
|
||||
zip \
|
||||
&& pecl -q install \
|
||||
zip \
|
||||
&& docker-php-ext-configure intl \
|
||||
&& docker-php-ext-configure opcache --enable-opcache \
|
||||
&& docker-php-ext-install \
|
||||
intl \
|
||||
opcache \
|
||||
zip
|
||||
|
||||
# Add source
|
||||
COPY . .
|
||||
|
||||
# Build runtime image
|
||||
FROM base as rector
|
||||
|
||||
COPY --from=build /usr/local/lib/php /usr/local/lib/php
|
||||
COPY --from=build /usr/local/etc/php /usr/local/etc/php
|
||||
COPY .docker/php/opcache.ini /usr/local/etc/php/conf.d/opcache.ini
|
||||
|
||||
ENV PATH /rector/bin:$PATH
|
||||
|
||||
# Add source
|
||||
COPY . /rector
|
||||
|
||||
ENTRYPOINT [ "rector" ]
|
||||
|
||||
VOLUME ["/project"]
|
||||
WORKDIR "/project"
|
||||
|
||||
RUN mkdir -p /tmp/opcache
|
||||
|
||||
RUN chmod +x /rector/bin/rector
|
||||
RUN /rector/bin/rector list
|
||||
|
||||
RUN mkdir -p /tmp/opcache \
|
||||
&& /rector/bin/rector list \
|
||||
&& chmod 777 -R /tmp
|
Loading…
Reference in New Issue
Block a user