I created a trigger in Container Registry. I have my script in GIT HUB repo. In Build trigger selected repository hosting option as GitHub and Authenticated.
STEP: 1: Selected git hub source repository
STEP:2: Selected my git hub repo and authenticated.
STEP 3: Created trigger using docker file option.
STEP 4: Trigger ran & I got build failed.
Build log
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
I got this issue unable to prepare context: unable to evaluate symlinks in Docker file path: lstat /workspace/Dockerfile: no such file or directory.
I don't know what I missed here. But each push in git hub trigger running automatically with build failed.
Please help me to fix this.
The contents of /workspace
are the contents of your git repository; in this case, https://github.com/dhandapanisattanathan/gcb. Your repository has no Dockerfile
, so you can't use that non-existent Dockerfile
to build.
It looks like your repository is for a GAE standard app. It's probably possible to transform it into a runnable container, but I don't know exactly what you would put in your Dockerfile to make it happen.