title: How to access cloud run environment variables in Dockerfile
body: <p>I have built a containerised python application which runs without issue locally using a <strong>.env</strong> file and and a <strong>docker-compose.yml</strong> file compiled with <strong>compose build.</strong></p>
  <p>I am then able to use variables within the Dockerfile like this.</p>
  <pre><code>ARG APP_USR
  ENV APP_USR ${APP_USR}
  
  ARG APP_PASS
  ENV APP_PASS ${APP__PASS}
  
  RUN pip install https://${APP_USR}:${APP_PASS}@github.org/*****/master.zip
  </code></pre>
  <p>I am deploying to cloud run via a synced bitbucket repository, and have defined  under <strong>&quot;REVISIONS&quot; &gt; &quot;SECRETS AND VARIABLES&quot;</strong>,(as described here: <a href="https://cloud.google.com/run/docs/configuring/environment-variables" rel="nofollow noreferrer">https://cloud.google.com/run/docs/configuring/environment-variables</a>)
  but I can not work out how to access these variables in the Dockerfile during build.</p>
  <p>As I understand it, I need to create a cloudbuild.yaml file to define the variables, but I haven't been able to find a clear example of how to set this up using the Environment variables defined in cloud run.</p>