docker.py 文件源码

python
阅读 45 收藏 0 点赞 0 评论 0

项目:gopythongo 作者: gopythongo 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号