How To Install hadolint on Fedora 36

In this tutorial we learn how to install hadolint in Fedora 36. hadolint is Dockerfile linter, validate inline bash

Introduction

In this tutorial we learn how to install hadolint on Fedora 36.

What is hadolint

A smarter Dockerfile linter that helps you build best practice Docker images. The linter is parsing the Dockerfile into an AST and performs rules on top of the AST. It is standing on the shoulders of ShellCheck to lint the Bash code inside RUN instructions.

We can use yum or dnf to install hadolint on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install hadolint.

Install hadolint on Fedora 36 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install hadolint using dnf by running the following command:

sudo dnf -y install hadolint

Install hadolint on Fedora 36 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install hadolint using yum by running the following command:

sudo yum -y install hadolint

How To Uninstall hadolint on Fedora 36

To uninstall only the hadolint package we can use the following command:

sudo dnf remove hadolint

hadolint Package Contents on Fedora 36

/usr/bin/hadolint
/usr/lib/.build-id
/usr/lib/.build-id/13
/usr/lib/.build-id/13/922745553ec05376abd83bd36b4c6939a5ff5d
/usr/share/bash-completion/completions/hadolint
/usr/share/doc/hadolint
/usr/share/doc/hadolint/README.md
/usr/share/licenses/hadolint
/usr/share/licenses/hadolint/LICENSE

References

Summary

In this tutorial we learn how to install hadolint on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).