Add hadolint
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
IamTheFij 2020-05-19 13:27:54 -07:00
parent 433aa60a38
commit 96e53d68bb
3 changed files with 21 additions and 9 deletions

View File

@ -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

View File

@ -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.

View File

@ -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