title: Add alias to Docker during build
body: <p>Since I am trying to compile a program during the build phase of a container, I'm including my aliases during the build of the container inside the .bashrc:</p>
  
  <pre><code>RUN cat /path/to/aliases.sh &gt;&gt; ~/.bashrc
  </code></pre>
  
  <p>When I start the container, all aliases are available. This is already good, but not the behavior that I want.</p>
  
  <p>I've already google around and found out, that the .bashrc file is only loaded when using an interactive shell, which is not the case during the build phase of the container.</p>
  
  <p>I'm trying to force the load of my aliases using:</p>
  
  <pre><code>RUN shopt -s expand_aliases
  </code></pre>
  
  <p>or </p>
  
  <pre><code>RUN shopt -s expand_aliases &amp;&amp; alias
  </code></pre>
  
  <p>or</p>
  
  <pre><code>RUN /bin/bash -c "both commands listed above..."
  </code></pre>
  
  <p>Which surprisingly does not yield to the expected outcome. [/irony off]</p>
  
  <p>Now my question: How can I set aliases for the build phase of the container?</p>
  
  <p>Regards</p>