title: ERROR: (gcloud.app.deploy) You must provide your own Dockerfile when using a custom runtime
body: <p>I am trying to schedule an R job on Google Cloud using App Engine. I am following the article </p>
  
  <p><a href="https://code.markedmondson.me/4-ways-schedule-r-scripts-on-google-cloud-platform/" rel="nofollow noreferrer">https://code.markedmondson.me/4-ways-schedule-r-scripts-on-google-cloud-platform/</a></p>
  
  <p>However, when I try to deploy the app using <code>gcloud app deploy --project shiny-demo</code> I get the following error </p>
  
  <pre><code>Enabling service [appengineflex.googleapis.com] on project [shiny-demo]...
  Waiting for async operation operations/acf.33c5e6da-6f9e-4e66-b7d3-f0611eddc0ce to complete...
  Operation finished successfully. The following command can describe the Operation details:
   gcloud services operations describe operations/tmo-acf.33c5e6da-6f9e-4e66-b7d3-f0611eddc0ce
  Beginning deployment of service [default]...
  ERROR: (gcloud.app.deploy) You must provide your own Dockerfile when using a custom runtime. Otherwise provide a "runtime" field with one of the supported runtimes.
  </code></pre>
  
  <p>I do have a Dockerfile in the same folder as my yaml file, however somehow it does not recognize the Dockerfile. Below is my yaml file:</p>
  
  <pre class="lang-yaml prettyprint-override"><code># app.yaml file
  runtime: custom
  env: flex
  
  manual_scaling:
    instances: 1
  resources:
    cpu: 1
    memory_gb: 0.5
    disk_size_gb: 10
  
  env_variables:
    GCS_AUTH_FILE: authkey.json
  </code></pre>
  
  <p>My Dockerfile:</p>
  
  <pre><code># DOCKER
  FROM trestletech/plumber
  LABEL maintainer="mark"
  RUN export DEBIAN_FRONTEND=noninteractive; apt-get -y update \
   &amp;&amp; apt-get install -y libcairo2-dev \
      libcurl4-openssl-dev \
      libgmp-dev \
      libpng-dev \
      libssl-dev \
      libxml2-dev \
      make \
      pandoc \
      pandoc-citeproc \
      zlib1g-dev
  RUN ["install2.r", "-r 'https://cloud.r-project.org'", "readr", "googleCloudStorageR", "bigrquery", "Rcpp", "digest", "crayon", "withr", "mime", "R6", "jsonlite", "xtable", "magrittr", "httr", "curl", "testthat", "devtools", "hms", "shiny", "httpuv", "memoise", "htmltools", "openssl", "tibble", "remotes"]
  RUN ["installGithub.r", "MarkEdmondson1234/googleAuthR@7917351", "hadley/rlang@ff87439"]
  WORKDIR /payload/
  COPY [".", "./"]
  
  EXPOSE 8080
  ENTRYPOINT ["R", "-e", "pr &lt;- plumber::plumb(commandArgs()[4]); pr$run(host='0.0.0.0', port=8080)"]
  CMD ["myscript.R"]
  </code></pre>
  
  <p>I am a bit new to Docker.</p>
  
  <p>Adding the picture for folder structure:</p>
  
  <p><a href="https://i.stack.imgur.com/Xx2oD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Xx2oD.png" alt="enter image description here"></a></p>