containerfile: warn if we don't have a Dockerfile

Currently if no Dockerfile is specified or found, we exit later with
an obscure error.  Check this after the element search; if we still
don't have something to build then we can't continue.

Change-Id: Ifb17a0995fab0ccfe7ee08363676c1fa57e37592
This commit is contained in:
Ian Wienand 2022-06-10 11:33:05 +10:00
parent 979ad64dd5
commit 3e51709307
1 changed files with 5 additions and 0 deletions

View File

@ -57,6 +57,11 @@ if [ -z "${DIB_CONTAINERFILE_DOCKERFILE:-}" ]; then
done
$_xtrace
if [ -z "${DIB_CONTAINERFILE_DOCKERFILE:-}" ]; then
echo "*** DIB_CONTAINERFILE_DOCKERFILE not specified or found!"
exit 1
fi
fi
# Use the image cache directory as the default context, so anything