File tree Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Original file line number Diff line number Diff line change 40
40
echo "There were errors in some of the checked files. Please run `json_verify` on such files and fix issues there."
41
41
fi
42
42
exit "${ret_code}"
43
+
44
+ - name : Validate Dockerfiles
45
+ id : validate-dockerfiles
46
+ run : |
47
+ type hadolint || sudo apt-get -y install wget \
48
+ && wget --output-document=hadolint https://github.com/hadolint/hadolint/releases/download/v2.12.0/hadolint-Linux-x86_64 \
49
+ && chmod a+x hadolint
50
+ echo "Starting Hadolint"
51
+ find . -name "Dockerfile" | xargs ./hadolint --config ./ci/hadolint-config.yaml
52
+ echo "Hadolint done"
Original file line number Diff line number Diff line change
1
+ ---
2
+
3
+ # Reference https://github.com/hadolint/hadolint
4
+ # hadolint --config ./ci/hadolint-config.yaml <Dockerfile>
5
+
6
+ # We should revisit this ignore list and reduce it regularly
7
+
8
+ ignored :
9
+ # DL3006 warning: Always tag the version of an image explicitly
10
+ - DL3006
11
+ # DL3033 warning: Specify version with `yum install -y <package>-<version>`.
12
+ - DL3033
13
+ # DL3045 warning: `COPY` to a relative destination without `WORKDIR` set.
14
+ - DL3045
15
+ # DL3041 warning: Specify version with `dnf install -y <package>-<version>`.
16
+ - DL3041
17
+ # DL3059 info: Multiple consecutive `RUN` instructions. Consider consolidation.
18
+ - DL3059
19
+ # DL3013 warning: Pin versions in pip. Instead of `pip install <package>` use
20
+ # `pip install <package>==<version>` or `pip install --requirement <requirements file>`
21
+ - DL3013
22
+ # DL4006 warning: Set the SHELL option -o pipefail before RUN with a pipe in it.
23
+ # If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox
24
+ # then consider explicitly setting your SHELL to /bin/ash, or disable this check
25
+ - DL4006
26
+ # DL3007 warning: Using latest is prone to errors if the image will ever update.
27
+ # Pin the version explicitly to a release tag
28
+ - DL3007
29
+ # SC3060 warning: In POSIX sh, string replacement is undefined.
30
+ - SC3060
31
+ # SC2086 info: Double quote to prevent globbing and word splitting.
32
+ - SC2086
33
+ # SC2046 warning: Quote this to prevent word splitting.
34
+ - SC2046
35
+ # SC2140 warning: Word is of the form "A"B"C" (B indicated). Did you mean "ABC" or "A\"B\"C"?
36
+ - SC2140
You can’t perform that action at this time.
0 commit comments