Skip to content

milchundzucker/docker-php-parallel-lint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

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

About

Builds parallel-lint PHP PHAR binary

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published