title: how to use sed command with docker run to replace text on a .conf file for nginx docker image?
body: <p>My <code>entrypoint.sh</code> looks like this :</p>
  
  <pre><code>sed -i 's/HOST_NAME/'"$HOST_NAME"'/g' /usr/local/openresty/nginx/conf/conf.d/CONFIG_FILE.conf
  
  exec "$@"
  </code></pre>
  
  <p><code>CONFIG_FILE.conf</code> is this : </p>
  
  <pre><code>upstream gunicorn {
      server $HOST_NAME;
  }
  </code></pre>
  
  <p>My docker run command looks like this :</p>
  
  <pre><code>docker run -e HOST_NAME=http://cnn.com sid:latest cat /usr/local/openresty/nginx/conf/conf.d/CONFIG_FILE.conf
  </code></pre>
  
  <p>I am trying to pass <code>cnn.com</code> via docker run to replace <code>$HOST_NAME</code> in <code>CONFIG_FILE.conf</code>.</p>
  
  <p>Any help would be highly appreciated, I am new to this, So Please bear with me if I made silly mistakes.</p>
  
  <p>Thanks.</p>