diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2019-06-24 16:40:38 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2019-06-24 16:40:38 +0300 |
commit | ec519dc976c5a16a3e6c8bf81cd8c7052b7cec22 (patch) | |
tree | 6f247d21a5b311cdabe546bb2196142e51444edb /include/helper_audit_dockerfile | |
parent | d0377c563dd2e69da3c86b475237409d44809eb8 (diff) |
Minor cleanups
Diffstat (limited to 'include/helper_audit_dockerfile')
-rw-r--r-- | include/helper_audit_dockerfile | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/include/helper_audit_dockerfile b/include/helper_audit_dockerfile index 273bb347..3d18556f 100644 --- a/include/helper_audit_dockerfile +++ b/include/helper_audit_dockerfile @@ -59,13 +59,12 @@ fi IS_ALPINE=$(echo ${IMAGE} | grep -i alpine) IS_LATEST=$(echo ${TAG} | grep -i latest) - if [ ! "${IS_DEBIAN}" = "" ]; then IMAGE="debian"; fi - if [ ! "${IS_FEDORA}" = "" ]; then IMAGE="fedora"; fi - if [ ! "${IS_UBUNTU}" = "" ]; then IMAGE="ubuntu"; fi - if [ ! "${IS_ALPINE}" = "" ]; then IMAGE="alpine"; fi - - if [ ! "${IS_LATEST}" = "" ]; then - ReportWarning "dockerfile" "latest TAG used. Specifying the version is better." + if [ ! -z "${IS_DEBIAN}" ]; then IMAGE="debian"; fi + if [ ! -z "${IS_FEDORA}" ]; then IMAGE="fedora"; fi + if [ ! -z "${IS_UBUNTU}" ]; then IMAGE="ubuntu"; fi + if [ ! -z "${IS_ALPINE}" ]; then IMAGE="alpine"; fi + if [ ! -z "${IS_LATEST}" ]; then + ReportWarning "dockerfile" "latest TAG used. Specifying a targeted OS image and version is better for reproducible results." fi case ${IMAGE} in |