<p>I understand <code>gcloud</code> uses the Dockerfile specified in the root directory of the source (<code>.</code>) as in the command:
<code>gcloud builds submit --tag gcr.io/[PROJECT_ID]/quickstart-image .</code></p>

<p>but I am trying to specify the Dockerfile to use to build the image which I have not found any resource on how to do that, I don't know if that is possible.</p>

<p>The only way to specify a Dockerfile (i.e. other than <code>./Dockerfile</code>) would be to create a <code>cloudbuild.yaml</code> per techtabu@. This config could then use the <code>docker</code> builder and provide the specific Dockerfile, i.e.:</p>

<pre><code>steps:
- name: "gcr.io/cloud-builders/docker"
  args:
  - build
  - "--tag=gcr.io/$PROJECT_ID/quickstart-image"
  - "--file=./path/to/YourDockerFile"
  - .
...
images:
- "gcr.io/$PROJECT_ID/quickstart-image"
</code></pre>

<p>If you wish, you also get to specify an alternative name than <code>cloudbuild.yaml</code>.</p>

<p>The <code>./Dockerfile</code> assumption is presumably to ease the transition to Cloud Build. </p>

<p>I recommend you switch to using <code>cloudbuild.yaml</code> for the flexibility it provides.</p>
