mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-17 21:38:22 +01:00
build(docker): use alpine for smaller image
This commit is contained in:
parent
d12d6ea041
commit
a75d76de19
16
Dockerfile
16
Dockerfile
@ -1,17 +1,17 @@
|
||||
FROM composer:latest AS composer
|
||||
FROM composer:1.8 AS composer
|
||||
|
||||
COPY ./composer.json /app
|
||||
COPY composer.json composer.json
|
||||
|
||||
RUN composer install --no-dev
|
||||
RUN composer global require hirak/prestissimo && \
|
||||
composer install --prefer-dist --no-scripts --no-dev --no-autoloader && \
|
||||
rm -rf /root/.composer
|
||||
|
||||
FROM php:7.1-cli-alpine
|
||||
|
||||
FROM php:7.1-cli
|
||||
COPY --from=composer /app .
|
||||
|
||||
WORKDIR /rector
|
||||
|
||||
COPY . /rector
|
||||
COPY --from=composer /app .
|
||||
|
||||
CMD ["bin/rector", "process", "/project", "--dry-run", "--config", "/project/rector.yaml"]
|
||||
|
||||
# TODO: dev with xdebug extension for local development
|
||||
ENTRYPOINT [ "bin/rector" ]
|
||||
|
Loading…
x
Reference in New Issue
Block a user