def validate_args(self, args: configargparse.Namespace) -> None:
_docker_args.validate_shared_args(args)
if not args.docker_buildfile:
raise ErrorMessage("Using the docker builder requires you to specify a Dockerfile template via "
"--docker-buildfile.")
if not os.path.exists(args.docker_buildfile) or not os.access(args.docker_buildfile, os.R_OK):
raise ErrorMessage("It seems that GoPythonGo can't find or isn't allowed to read %s" %
highlight(args.docker_buildfile))
for arg in args.docker_buildargs:
if "=" not in arg:
raise ErrorMessage("A Docker build arg must be in the form 'key=value'. Consult the %s "
"documentation for more information. '%s' does not contain a '='." %
(highlight("docker build"), arg))
for var in args.dockerfile_vars:
if "=" not in var:
raise ErrorMessage("A Dockerfile Jinja template context variable must be in the form 'key=value'. "
"'%s' does not contain a '='" % var)
评论列表
文章目录