in tools/ci_build/get_docker_image.py [0:0]
def parse_args():
parser = argparse.ArgumentParser(
description="Gets a docker image, either by pulling it from a "
"container registry or building it locally and then pushing it. "
"The uniqueness of the docker image is determined by a hash digest of "
"the Dockerfile, the build context directory, and arguments to "
"'docker build' affecting the image content. "
"This digest value is used in the image tag. "
"This script checks whether an image with that tag is initially "
"present in the container registry to determine whether to pull or "
"build the image. "
"The user must be logged in to the container registry.")
parser.add_argument(
"--dockerfile", default="Dockerfile", help="Path to the Dockerfile.")
parser.add_argument(
"--context", default=".", help="Path to the build context.")
parser.add_argument(
"--docker-build-args", default="",
help="String of Docker build args which may affect the image content. "
"These will be used in differentiating images from one another. "
"For example, '--build-arg'.")
parser.add_argument(
"--docker-build-args-not-affecting-image-content", default="",
help="String of Docker build args which do not affect the image "
"content.")
parser.add_argument(
"--container-registry",
help="The Azure container registry name. "
"If not provided, no container registry will be used.")
parser.add_argument(
"--repository", required=True, help="The image repository name.")
parser.add_argument(
"--docker-path", default="docker", help="Path to docker.")
return parser.parse_args()