You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 26, 2023. It is now read-only.
In the first step, I run Hadolint: docker run --rm -i -e HADOLINT_FORMAT='checkstyle' hadolint/hadolint < Dockerfile.txt > hadolint_report.xml
This creates an output files containing 2 detected issues:
<?xml version='1.0' encoding='UTF-8'?>
<checkstyle version='4.3'>
<file name='-'>
<error line='12' column='1' severity='warning' message='`COPY` to a relative destination without `WORKDIR` set.' source='DL3045'/>
<error line='24' column='1' severity='error' message='Use COPY instead of ADD for files and folders' source='DL3020'/>
</file>
</checkstyle>
In the second step, I run sonarscanner: sonarscanner -Dsonar.host.url=http://localhost:9000 -Dsonar.login=XXX -Dsonar.password=YYY -Dsonar.projectKey=ZZZ -Dsonar.lang.patterns.dockerfile=Dockerfile.txt -Dsonar.hadolint.reports.path=hadolint_report.xml
My trouble is: in SonarQube, I cannot see any issue displayed. Actually, this is no wonder: the association between the found issues (in file hadolint_report.xml) and the source file (Dockerfile.txt) is not set anywhere. The sonarscanner step above displays:
ERROR: The source file '-' mentionned in Hadolint report was not found