title: Google Cloud Build - Pass environment variable for Dockerfile
body: <p>I´m trying to dockerize my Angular application for Cloud Run and then conditionally build it with the production or the development configuration based on an environment variable.</p>
  <p><em>cloud build command</em>:</p>
  <p><code>gcloud builds submit --tag gcr.io/project-id/image-id --timeout=1200</code></p>
  <p><em>Dockerfile</em>:</p>
  <pre><code>FROM node:14
  
  WORKDIR usr/src/app
  
  COPY package*.json ./
  
  RUN npm install
  
  # Copy local code to the container
  COPY . .
  
  # Build app
  RUN if [ &quot;$ENV&quot; = &quot;development&quot; ] ; then npm run build-dev:ssr ; else npm run build-prod:ssr ; fi
  
  CMD [&quot;npm&quot;, &quot;run&quot;, &quot;serve:ssr&quot;]
  </code></pre>
  <p>At the moment, the <code>$ENV</code> doesn´t exist, but is there a way to pass this with the <code>gcloud build submit</code> command?</p>