mirror of https://github.com/google/oss-fuzz.git
[helper] Add a prompt to build_image command for pulling base images. (#595)
This commit is contained in:
parent
d805e5ffce
commit
cfba9598d7
|
@ -260,8 +260,18 @@ def docker_pull(image, pull=False):
|
||||||
|
|
||||||
def build_image(args):
|
def build_image(args):
|
||||||
"""Build docker image."""
|
"""Build docker image."""
|
||||||
|
pull = args.pull
|
||||||
|
if not pull:
|
||||||
|
y_or_n = raw_input('Pull latest base images (compiler/runtime)? (y/N): ')
|
||||||
|
pull = y_or_n.lower() == 'y'
|
||||||
|
|
||||||
|
if pull:
|
||||||
|
print('Pulling latest base images...')
|
||||||
|
else:
|
||||||
|
print('Using cached base images...')
|
||||||
|
|
||||||
# If build_image is called explicitly, don't use cache.
|
# If build_image is called explicitly, don't use cache.
|
||||||
if _build_image(args.project_name, no_cache=True, pull=args.pull):
|
if _build_image(args.project_name, no_cache=True, pull=pull):
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|
Loading…
Reference in New Issue