Browse Source

Add hadolint

master v2.0.0
IamTheFij 1 year ago
parent
commit
96e53d68bb
  1. 17
      .pre-commit-hooks.yaml
  2. 6
      README.md
  3. 7
      hooks.yaml

17
.pre-commit-hooks.yaml

@ -1,6 +1,19 @@
---
- id: docker-compose-check
name: Validate docker-compose files
description: Checks that vault files are encrypted
description: Checks that docker-compose files are valid
language: script
entry: compose-check.sh
files: docker-compose.y[a]{0,1}ml$
language: script
- id: hadolint
name: Lint Dockerfiles
description: Runs hadolint Docker image to lint Dockerfiles
language: docker_image
entry: hadolint/hadolint hadolint
files: Dockerfile
- id: hadolint-system
name: Lint Dockerfiles
description: Runs system hadolint to lint Dockerfiles
language: system
entry: hadolint
files: Dockerfile

6
README.md

@ -6,3 +6,9 @@ A set of [pre-commit](http://pre-commit.com) hooks for Docker services
### docker-compose-check
Verifies that docker-compose files are valid by using `docker-compose config` to parse them.
### hadolint
Uses the [hadolint Docker image](https://hub.docker.com/hadolint/hadolint) to lint Dockerfiles.
### hadolint-system
Uses the whatever version of hadolint that you have installed to lint Dockerfiles. This requires you to have hadolint installed somewhere in your path.

7
hooks.yaml

@ -1,7 +0,0 @@
---
- id: docker-compose-check
name: Validate docker-compose files
description: Checks that docker-compose files are valid
entry: compose-check.sh
files: docker-compose.y[a]{0,1}ml$
language: script
Loading…
Cancel
Save