title: Dockerfile for cloning private git repo
body: <p>I'm trying to clone private git repository from github. I did a Dockerfile like this:</p>
  
  <pre><code>FROM ubuntu:12.04
  
  RUN apt-get update
  RUN apt-get install -y git
  RUN mkdir -p /root/.ssh/
  ADD ./id_rsa /root/.ssh/id_rsa
  RUN git clone git@github.com:usr/repo.git
  </code></pre>
  
  <p>I use this repo with this key just fine locally, so it seems I'm missing something inside docker.</p>
  
  <p>One more thing I may be missing is that both <code>~</code> and <code>$HOME</code> inside docker point to <code>/</code> instead of <code>/root</code>, but I'm not sure if that can be related.</p>