-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ubuntu
committed
Mar 6, 2024
1 parent
be3a5d7
commit b59c6b4
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
|
||
# Simple script to install and run Hadolint | ||
echo "" | ||
echo "#====================================================#" | ||
echo "# Installing Hadolint" | ||
echo "#====================================================#" | ||
echo "" | ||
|
||
# Install Hadolint | ||
wget -O hadolint https://github.com/hadolint/hadolint/releases/download/v2.12.0/hadolint-Linux-x86_64 | ||
# Move to appropriate directory | ||
mv hadolint /usr/local/bin/hadolint | ||
# Make file executable | ||
chmod +x /usr/local/bin/hadolint | ||
# Check hadolint version to make sure it is installed | ||
hadolint -v | ||
|
||
echo "" | ||
echo "#====================================================#" | ||
echo "# Hadolint Installation Complete" | ||
echo "#====================================================#" | ||
echo "" | ||
# Run Hadolint on Dockerfile | ||
docker run --rm -i hadolint/hadolint < Dockerfile | ||
|
||
echo "" | ||
echo "#====================================================#" | ||
echo "# Dockerfile Linting Complete" | ||
echo "#====================================================#" | ||
echo "" |