def add_args(self, parser: configargparse.ArgumentParser) -> None:
_docker_args.add_shared_args(parser)
gp_docker = parser.add_argument_group("Docker Builder options")
gp_docker.add_argument("--docker-buildfile", dest="docker_buildfile", default=None,
help="Specify a Dockerfile to build the the build environment. The build commands will "
"then be executed inside the resulting container. The file is always processed as "
"a Jinja template and must contain certain variable placeholders. Read "
"--help-builder=docker for more information.")
gp_docker.add_argument("--docker-leave-containers", dest="docker_leave_containers", action="store_true",
default=False, env_var="DOCKER_LEAVE_CONTAINERS",
help="After creating a build environment and a runtime container, if this option is "
"used, GoPythonGo will not use 'docker rm' to clean up the resulting containers.")
gp_docker.add_argument("--docker-leave-images", dest="docker_leave_images", action="store_true",
default=False, env_var="DOCKER_LEAVE_IMAGES",
help="After creating a build environment and a runtime container, if this option is "
"used, GoPythonGo will not use '--force-rm' to clean up the intermediate build "
"images.")
gp_docker.add_argument("--docker-debug-savecontext", dest="docker_debug_save_context", default=None,
help="Set this to a filename to save the .tar.gz that GoPythonGo assembles as a "
"Docker context to build the build environment container using 'docker build'.")
gp_docker.add_argument("--docker-buildarg", dest="docker_buildargs", default=[], action="append",
help="Allows you to set Docker build args in the form of 'KEY=VALUE' which will be "
"passed to the Docker daemon and into your Dockerfile as ARGs.")
gp_docker.add_argument("--dockerfile-var", dest="dockerfile_vars", default=[], action="append",
help="Allows you to set Dockerfile Jinja template context variables in the form of "
"'key=value' which will be passed into your Dockerfile template before it is "
"rendered to be sent to the Docker daemon.")
评论列表
文章目录