title: How to execute a shell command before the ENTRYPOINT via the dockerfile
body: <p>I have the following file for my nodejs project</p>
  
  <pre><code>FROM node:boron
  
  # Create app directory
  RUN mkdir -p /usr/src/app
  WORKDIR /usr/src/app
  
  # Install app dependencies
  COPY package.json /usr/src/app/
  RUN npm install
  
  
  
  # Bundle app source
  COPY . /usr/src/app
  
  # Replace with env variable
  RUN envsubs &lt; fil1 &gt; file2
  
  EXPOSE 8080
  CMD [ "npm", "start" ]
  </code></pre>
  
  <p>I run the docker container with the -e flag providing the environment variable</p>
  
  <p>But I do not see the replacement. Will the Run ccommand be excuted when the env variable is available?</p>