Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support to lint the install commands in Dockerfiles
Change-Id: Icb47ba8b13b13889e28bb285321f11344400edc2 Closes-Bug:#1582618
- Loading branch information
Swapnil Kulkarni (coolsvap)
committed
May 26, 2016
1 parent
b40bf51
commit eb1bfc2
Showing
4 changed files
with
19 additions
and
3 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
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
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,12 @@ | ||
#!/bin/bash | ||
|
||
RES=0 | ||
|
||
for dockerfile in "$@"; do | ||
if grep "apt-get install\|yum install" "$dockerfile"; then | ||
echo "ERROR: $dockerfile has incorrectly formatted install command Should be in the form 'apt-get|yum -y install ...'" >&2 | ||
RES=1 | ||
fi | ||
done | ||
|
||
exit $RES |
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