Skip to content

Instantly share code, notes, and snippets.

@renatomefi
Created September 4, 2018 19:36
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/19fe3b719368ba6c377d168687b11879 to your computer and use it in GitHub Desktop.
Save renatomefi/19fe3b719368ba6c377d168687b11879 to your computer and use it in GitHub Desktop.

Dockerfile

FROM alpine:latest

Run

$ docker run --rm -i hadolint/hadolint hadolint -f json - < ./Dockerfile
[{"line":1,"code":"DL3007","message":"Using latest is prone to errors if the image will ever update. Pin the version explicitly to a release tag","column":1,"file":"/dev/stdin","level":"warning"}]

Formated json

[
    {
        "line": 1,
        "code": "DL3007",
        "message": "Using latest is prone to errors if the image will ever update. Pin the version explicitly to a release tag",
        "column": 1,
        "file": "/dev/stdin",
        "level": "warning"
    }
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment