title: How to execute command before default entrypoint?
body: <p>I have built a docker image over nginx-alpine one.
  I know that, at the start, the nginx image reads some configuration file and starts the server.</p>
  
  <p>The configuration file (I can see that from <a href="https://github.com/kung-foo/alpine-nginx/blob/master/entrypoint.sh" rel="nofollow noreferrer">github</a>) reads the configuration stored inside /etc/nginx.</p>
  
  <p>I'd like to perform some runtime operation on that configuration before actually starting the script. This configuration is based on an environment variable that I would set inside of my deployment descriptor.</p>
  
  <p>I know that I could simply overwrite the script, but what if in further versions they change it? I would have to keep updating it too.</p>
  
  <p>So, would it to be possible to:</p>
  
  <ol>
  <li>execute some custom shell instructions</li>
  <li>give the command to the default image entrypoint?</li>
  </ol>