Skip to content

Commit 762ec3d

Browse files
committed
Add Dockerfile linter
1 parent d50d2bc commit 762ec3d

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

.hadolint.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ignored:
2+
- DL3008 # Pin versions in apt-get install
3+
- DL3018 # Pin versions in apk add

.pre-commit-config.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,15 @@ repos:
4747
- id: shellcheck
4848
files: \.sh$
4949

50+
# Dockerfile linting with hadolint
51+
- repo: https://github.com/hadolint/hadolint
52+
rev: v2.14.0
53+
hooks:
54+
- id: hadolint-docker
55+
types: [file]
56+
files: (^|/)(Dockerfile|.*\.Dockerfile)$
57+
args: [--config, .hadolint.yaml]
58+
5059
# Configuration
5160
default_stages: [pre-commit]
5261
fail_fast: false

0 commit comments

Comments
 (0)