title: Basic auth for Curl command into the secret of openshift
body: <p>I have a Apache web server that has a Basic auth protected URL e.x. </p>
  
  <p>www.example.com/protected/</p>
  
  <p>In my Dockerfile in the Openshift when I build an image i have curl commands that download the files. Now that curl command with basic auth would look like this when using basic auth</p>
  
  <p>curl -u username:password <a href="http://www.example.com/protected/" rel="nofollow noreferrer">http://www.example.com/protected/</a></p>
  
  <p>Problem is I do not want to have username:password in the Dockerfile exposed. Instead I want to hide credentials in the Openshift/Kubernetes secret</p>
  
  <p>Normally openshift yaml file for secret definition would look like this in the beginig</p>
  
  <pre><code>kind: Secret
    apiVersion: v1
      metadata:
       name: secret-name
      data:
  </code></pre>
  
  <p>Question: How do I add create a proper secret file for basic auth credentials  and how do I then reference it from the Dockerfile?</p>