Handle the case where there is no FROM command in the Dockerfile
This commit is contained in:
parent
6d07cf94d2
commit
f795868b5b
1 changed files with 4 additions and 0 deletions
|
@ -206,6 +206,10 @@ class DockerfileBuildContext(object):
|
|||
|
||||
# Pull the image, in case it was updated since the last build
|
||||
image_and_tag = ':'.join(self._parsed_dockerfile.get_image_and_tag())
|
||||
if image_and_tag is None or image_and_tag[0] is None:
|
||||
self._build_logger('Missing FROM command in Dockerfile', build_logs.ERROR)
|
||||
raise JobException('Missing FROM command in Dockerfile')
|
||||
|
||||
self._build_logger('Pulling base image: %s' % image_and_tag)
|
||||
pull_status = self._build_cl.pull(image_and_tag, stream=True)
|
||||
|
||||
|
|
Reference in a new issue