-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
32 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
FROM ghcr.io/m-arcus/php-mess-detector:base | ||
FROM ghcr.io/m-arcus/php-fink:base | ||
|
||
ARG PHP_PHPMD_VERSION=2.15.0 | ||
ARG PHP_PHPMD_VERSION=0.10.3 | ||
|
||
LABEL org.opencontainers.image.authors="M-arcus" \ | ||
org.opencontainers.image.url="https://github.com/phpmd/phpmd/" \ | ||
org.opencontainers.image.documentation="https://phpmd.org/documentation/index.html" \ | ||
org.opencontainers.image.source="https://github.com/M-arcus/php-mess-detector-docker" \ | ||
org.opencontainers.image.url="https://github.com/dantleech/fink/" \ | ||
org.opencontainers.image.documentation="https://github.com/dantleech/fink/blob/master/README.md" \ | ||
org.opencontainers.image.source="https://github.com/M-arcus/php-fink-docker" \ | ||
org.opencontainers.image.vendor="M-arcus" \ | ||
org.opencontainers.image.licenses="MIT" \ | ||
org.opencontainers.image.title="PHP Mess Detector" | ||
org.opencontainers.image.title="Fink" | ||
|
||
ADD https://github.com/phpmd/phpmd/releases/download/${PHP_PHPMD_VERSION}/phpmd.phar /phpmd.phar | ||
ADD https://github.com/dantleech/fink/releases/download/${PHP_PHPMD_VERSION}/fink.phar /fink.phar | ||
|
||
ENTRYPOINT ["/usr/bin/php", "/phpmd.phar"] | ||
ENTRYPOINT ["/usr/bin/php", "/fink.phar"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
# Small PHP-Mess-Detector Docker image | ||
# Small Fink Docker image | ||
|
||
This image uses Wolfi-OS to create a very small PHPMD Docker image and still glibc, to be used in CI/CD pipelines. | ||
This image uses Wolfi-OS to create a very small [Fink](https://github.com/dantleech/fink) Docker image and still glibc, to be used in CI/CD pipelines. | ||
|
||
## Usage | ||
|
||
```bash | ||
# or alternative use ghcr.io/m-arcus/php-mess-detector:latest | ||
docker run --rm -v $(pwd):$(pwd) -w $(pwd) marcusmu/php-mess-detector:latest /path/to/source text codesize | ||
# or alternative use ghcr.io/m-arcus/php-fink:latest | ||
docker run --rm -v $(pwd):$(pwd) -w $(pwd) marcusmu/php-fink:latest https://my.website.com/ --output=result.json --exclude-url=Account --insecure | ||
``` | ||
|
||
If you don't want to pass the as arguments, you can create your regular `phpmd.xml` (and `phpmd.baseline.xml` and `.phpmd.result-cache.php` (`--cache`)) file and PHP Mess Detector will pick it up as usual. | ||
If you want to scan for broken links in a website, you can use the following command: | ||
|
||
```bash | ||
cat result.json | jq -c '. | select(.status!=200) | {status: .status, url: .url, referrer: .referrer}' | jq | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters