Sign inSign up

milchundzucker/php-parallel-lint

By milchundzucker

Updated about 4 years ago

Build the latest PHAR binary of PHP Parallel Lint (to use in your Dockerfile)

Image
1

50K+

milchundzucker/php-parallel-lint repository overview

Docker Image: milchundzucker/php-parallel-lint

Docker Stars Docker Pulls Docker Automated buil

This is one of our docker images we use to build our software with GitLab CI (Jenkins TBA). We use it in a multi-stage docker build to copy over the latest parallel-lint PHAR into our milchundzucker/php-essentials docker images. Although you can use this image from your command line (but beware it's build with the latest PHP version from php:alpine docker image).

How to use this image

Within your Dockerfile
FROM your-base-image

COPY --from=milchundzucker/php-parallel-lint:latest /usr/local/bin/parallel-lint /usr/local/bin/parallel-lint

# RUN /usr/local/bin/parallel-lint --version
From your command line

To use the linter from your command line, you need to mount your project directory into the container and then run the linter on the directory inside the container (i.e. /app). You should also be aware that the --exclude param of the linter expects the whole path (/app-prefix, for example /app/vendor).

# docker run -it --rm -v $(pwd):/app milchundzucker/php-parallel-lint:latest --version
# docker run -it --rm -v $(pwd):/app milchundzucker/php-parallel-lint:latest --help
# docker run -it --rm -v $(pwd):/app milchundzucker/php-parallel-lint:latest --exclude /app/vendor /app

How to debug the image

In case you want to debug this image you've to overwrite the entrypoint to get an interactive shell.

# docker run -it --rm -v $(pwd):/app --entrypoint=sh milchundzucker/php-parallel-lint:latest
/ apk add --update bash && bash
bash-4.3# parallel-lint --version

Tag summary

Content type

Image

Digest

sha256:cd0baf729

Size

31.1 MB

Last updated

about 4 years ago

docker pull milchundzucker/php-parallel-lint