kolla/tools/validate-install-command.sh
Swapnil Kulkarni (coolsvap) eb1bfc2c2e Add support to lint the install commands in Dockerfiles
Change-Id: Icb47ba8b13b13889e28bb285321f11344400edc2
Closes-Bug:#1582618
2016-05-26 17:41:42 +05:30

13 lines
278 B
Bash
Executable File

#!/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