title: Environment variable not picking up in dockerfile
body: <p>I have a Vue application which I serve with docker, currently I want to use environment variables to target specific project repo. But when I am setting env variables, it's not picking up in dockerfile,</p>
  <p>What am I doing wrong in my setup ?</p>
  <p><strong>NPM scripts</strong>.</p>
  <pre><code>scripts: {
     &quot;build:project1&quot;: &quot;vue-cli-service build src/project1/main.js&quot;,
     &quot;deploy:project1&quot;: &quot;cross-env PROJECT_REPO=project1 bash build_deploy.sh&quot;
  }
  </code></pre>
  <p><strong>build_deploy.sh</strong></p>
  <pre><code>#!/bin/bash
  
  docker build -t ${PROJECT_REPO} .
  </code></pre>
  <p><strong>Dockerfile</strong></p>
  <pre><code># build stage
  FROM node:lts-alpine as build-stage
  WORKDIR /app
  COPY package*.json ./
  RUN npm install
  COPY . .
  RUN npm run build:${PROJECT_REPO}
  
  # production stage
  FROM nginx:stable-alpine as production-stage
  COPY --from=build-stage /app/dist /usr/share/nginx/html
  EXPOSE 80
  CMD [&quot;nginx&quot;, &quot;-g&quot;, &quot;daemon off;&quot;]
  </code></pre>