-
Notifications
You must be signed in to change notification settings - Fork 48
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
2 changed files
with
11 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
FROM hadolint/hadolint:v1.17.5-alpine | ||
|
||
COPY LICENSE README.md / | ||
COPY LICENSE README.md problem-matcher.json / | ||
COPY hadolint.sh /usr/local/bin/hadolint.sh | ||
|
||
ENTRYPOINT [ "/usr/local/bin/hadolint.sh" ] |
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,5 +1,14 @@ | ||
#!/bin/sh | ||
|
||
echo '::add-matcher::problem-matcher.json' | ||
# The problem-matcher definition must be present in the repository | ||
# checkout (outside the Docker container running hadolint). We create | ||
# a temporary folder and copy problem-matcher.json to it and make it | ||
# readable. | ||
TMP_FOLDER=$(mktemp -d -p .) | ||
cp /problem-matcher.json "${TMP_FOLDER}" | ||
chmod -R a+rX "${TMP_FOLDER}" | ||
trap "rm -rf \"${TMP_FOLDER}\"" EXIT | ||
|
||
echo "::add-matcher::${TMP_FOLDER}/problem-matcher.json" | ||
|
||
hadolint "$@" |