Lint a Dockerfile, displaying the output in JSON format

hadolint

hadolint --format {{json}} {{path/to/Dockerfile}}

click the source code to copy install hadolint on any operating system with command-not-found.com