add a few basic test (#572)

This commit is contained in:
superpoussin22 2018-08-15 13:54:56 +02:00 committed by Michael Boelen
parent 6567b16730
commit 6ba7bad34e
1 changed files with 25 additions and 0 deletions

View File

@ -111,6 +111,31 @@ InsertSection "Basics"
MAINTAINER=$(echo ${FIND})
Display --indent 2 --text "Maintainer" --result "${MAINTAINER}"
fi
FIND=$(grep "^ENTRYPOINT" ${AUDIT_FILE} | cut -d' ' -f2 )
if [ "${FIND}" = "" ]; then
ReportWarning "dockerfile" "No ENTRYPOINT defined in Dockerfile."
else
ENTRYPOINT=$(echo ${FIND})
Display --indent 2 --text "ENTRYPOINT" --result "${ENTRYPOINT}"
fi
FIND=$(grep "^CMD" ${AUDIT_FILE} | cut -d' ' -f2 )
if [ "${FIND}" = "" ]; then
ReportWarning "dockerfile" "No CMD defines in Dockerfile."
else
CMD=$(echo ${FIND})
Display --indent 2 --text "CMD" --result "${CMD}"
fi
FIND=$(grep "^USER" ${AUDIT_FILE} | cut -d' ' -f2 )
if [ "${FIND}" = "" ]; then
ReportWarning "dockerfile" "No user declared in Dockerlfile. Container will execute command as root"
else
USER=$(echo ${FIND})
Display --indent 2 --text "User" --result "${USER}"
fi
#
##################################################################################################