Container Registry中的构建触发器失败

时间:2017-06-06 12:39:21

标签: github google-cloud-platform google-container-registry

我在Container Registry中创建了一个触发器。我在GIT HUB repo中有我的脚本。 在Build触发器中选择的存储库托管选项为GitHub和Authenticated。

步骤:1:选择git hub源存储库

enter image description here

步骤:2:选择我的git hub repo并进行身份验证。

enter image description here

步骤3:使用docker file选项创建触发器。

enter image description here

第4步:触发器运行&我的构建失败了。

enter image description here

构建日志

starting build "5b04afe3-b669-48c6-83b1-58342f918256"

FETCHSOURCE
Initialized empty Git repository in /workspace/.git/
From https://source.developers.google.com/p/project-id/r/github-dhandapanisattanathan-gcb
* branch 59182f2dd5caffcc224d49299595056afd64d295 -> FETCH_HEAD
HEAD is now at 59182f2 ver 2
BUILD
Already have image (with digest): gcr.io/cloud-builders/docker
unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /workspace/Dockerfile: no such file or directory
ERROR
ERROR: build step "gcr.io/cloud-builders/docker@sha256:bb4f74d4d598896f932f4d2a5b12b3a816f5f6d3c9cf1f50d0bdd98fd4004d2d" failed: exit status 1

我遇到了这个问题无法准备上下文:无法评估Docker文件路径中的符号链接:lstat / workspace / Dockerfile:没有这样的文件或目录。

我不知道我错过了什么。但是每次推送git hub触发器都会自动运行并且构建失败。

请帮我解决这个问题。

1 个答案:

答案 0 :(得分:2)

/workspace的内容是git存储库的内容;在这种情况下,https://github.com/dhandapanisattanathan/gcb。您的存储库没有Dockerfile,因此您无法使用不存在的Dockerfile进行构建。

您的存储库看起来像是GAE标准应用程序。它可能可以将它转换为一个可运行的容器,但我不知道你将在Dockerfile中放入什么来实现它。