1
votes

I am becoming increasingly frustrated with the quickstart guide to deploying gcloud using Docker :

https://cloud.google.com/cloud-build/docs/quickstart-build

I am following every step but cannot build using the command :

gcloud builds submit --tag gcr.io/strange-vortex-286312/quickstart-image

If I list my projects this is what I see :

enter image description here

The tutorial says that I then use the PROJECT_ID and put it in the command which I listed above :

enter image description here

OK, fine. So I do exactly as the tutorial says, and run this command >

gcloud builds submit --tag gcr.io/strange-vortex-286312/quickstart-image

but then I get this error :

FETCHSOURCE
Fetching storage object: gs://strange-vortex-286312_cloudbuild/source/1597335850.83144-c6bf33c39ca54474a15cf04835a07444.tgz#1597335851899497
Copying gs://strange-vortex-286312_cloudbuild/source/1597335850.83144-c6bf33c39ca54474a15cf04835a07444.tgz#1597335851899497...
/ [1 files][  263.0 B/  263.0 B]
Operation completed over 1 objects/263.0 B.
BUILD
Already have image (with digest): gcr.io/cloud-builders/docker

                   ***** NOTICE *****

Alternative official `docker` images, including multiple versions across
multiple platforms, are maintained by the Docker Team. For details, please
visit https://hub.docker.com/_/docker.

                ***** END OF NOTICE *****

unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /workspace/Dockerfile: no such file or directory
ERROR
ERROR: build step 0 "gcr.io/cloud-builders/docker" failed: step exited with non-zero status: 1
----------------------------------------------------------------------------------------------------------------------------------------

ERROR: (gcloud.builds.submit) build 9c7c268f-07f3-486e-842f-8c1a0e2877ae completed with status "FAILURE"

I am unsure what this error message is trying to tell me.

If I to my console then I see this error :

enter image description here

I am also unsure what this error is trying to tell me.

1
The error suggests that there is no Dockerfile in the directory from which you're running the gcloud builds submit ... command.DazWilkin
If that's not the issue, can you try gcloud builds submit . --tag gcr.io/strange-vortex-286312/quickstart-image NOTE the period between submit and --tag.DazWilkin
3 important things: please make sure the CloudBuild API is enabled, which version of the SDK are you using, and have you tried using CloudShell?Soni Sol
Hi Daz, yes. I have DockerFile. I tried with the period "." and I still get the same errorOliver Watkins
Jose: (1) Enabled CloudBuildAPI still same error, (2) SDK of what? (3) No havent tried CloudShellOliver Watkins

1 Answers

1
votes

OK. In my case the Dockerfile was incorrectly named.

I had..

DockerFile

..and not

Dockerfile

The capital F was the problem. It took me for ever to figure this out because DockerFile works in normal Docker so I didnt think there was an issue with capitalization.