Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save renatomefi/2f5c88ce642a97498bc497ce93873be6 to your computer and use it in GitHub Desktop.
Save renatomefi/2f5c88ce642a97498bc497ce93873be6 to your computer and use it in GitHub Desktop.

Command argument ignore

$ docker run --rm -i hadolint/hadolint hadolint --ignore DL3007 - <./Dockerfile
$ hadolint echo $?
0

Commenting above the issue on Dockerfile

# hadolint ignore=DL3007
FROM alpine:latest
$ docker run --rm -i hadolint/hadolint hadolint - <./Dockerfile
$ hadolint echo $?
0

Configuration file

#.hadolint.yaml
ignored:
  - DL3007
$ docker run -v $(pwd):/project:ro --workdir=/project --rm -i hadolint/hadolint:latest-debian hadolint /project/Dockerfile
$ echo $?                                                                           
0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment