Skip to content

Commit

Permalink
Merge pull request #28 from jakzal/composer-cleanup
Browse files Browse the repository at this point in the history
Composer cleanup
  • Loading branch information
jakzal authored Jan 11, 2018
2 parents 97b3418 + ad4ac64 commit 528ddf4
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ matrix:
fast_finish: true

script:
- if [ "$flavour" = "latest" ]; then make build; else make build-alpine; fi
- if [ "$flavour" = "latest" ]; then make build-latest; else make build-alpine; fi
- docker run -it --rm jakzal/phpqa:$flavour php /usr/local/bin/tools.php test
- docker run -it --rm jakzal/phpqa:$flavour

Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends $TOOL_DEPS $BUI
&& echo "memory_limit=-1" >> $PHP_INI_DIR/php.ini \
&& echo "phar.readonly=0" >> $PHP_INI_DIR/php.ini \
&& php /usr/local/bin/tools.php install \
&& rm -rf ~/.composer/cache \
&& apt-get purge -y --auto-remove $BUILD_DEPS

CMD php /usr/local/bin/tools.php list
1 change: 1 addition & 0 deletions Dockerfile-alpine
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ RUN apk add --no-cache --virtual .tool-deps $TOOL_DEPS $LIB_DEPS \
&& echo "memory_limit=-1" >> $PHP_INI_DIR/php.ini \
&& echo "phar.readonly=0" >> $PHP_INI_DIR/php.ini \
&& php /usr/local/bin/tools.php install \
&& rm -rf ~/.composer/cache \
&& apk del .build-deps

CMD php /usr/local/bin/tools.php list
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
default: build

build:
docker build -t jakzal/phpqa:latest .
build: build-latest build-alpine
.PHONY: build

build-latest:
docker build -t jakzal/phpqa:latest .
.PHONY: build-latest

build-alpine:
docker build -f Dockerfile-alpine -t jakzal/phpqa:alpine .
.PHONY: build-alpine
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ phpqa phpstan analyse src
```bash
git clone https://github.com/jakzal/phpqa.git
cd phpqa
make build
make build-latest
```

To build the alpine version:
Expand Down

0 comments on commit 528ddf4

Please sign in to comment.