title: How can I customize a yum .repo file in a Dockerfile so it can be used as a source when installing packages?
body: <p>I have a private YUM repository hosted in a Docker container. I'd like to stand up another Docker container that knows about this private repository and uses it to install packages, something like:</p>
  
  <pre><code>ADD myrepo.repo /etc/yum.repos.d/myrepo.repo
  RUN yum install -y custompackage
  </code></pre>
  
  <p>The issue is the baseurl in myrepo.repo needs to be configurable, ideally I'd like to set an environment variable when doing <code>docker run -e MY_REPO_HOST=1.2.3.4 ...</code></p>
  
  <p>Any thoughts?</p>