title: Setting up a development environment with docker
body: <p>I'm facing some issues in setting up docker for a development environment for my team. So far:</p>
  
  <ol>
  <li><p>I used a base image to start a container</p>
  
  <pre><code>docker run -t -i ubuntu:latest "/bin/bash"
  </code></pre></li>
  <li><p>I installed all the compile and build tools in it</p></li>
  <li><p>I committed that image and pushed that to our local docker server</p>
  
  <pre><code>docker commit e239ab... 192.168.10.100:5000/team-dev:beta
  </code></pre></li>
  </ol>
  
  <hr>
  
  <p>So far so good. Now, acting as a team member:</p>
  
  <ol>
  <li><p>I pull the dev environment image on my computer</p>
  
  <pre><code>docker pull 192.168.10.100:5000/team-dev:beta
  </code></pre></li>
  <li><p>I start a container:</p>
  
  <pre><code>docker run -t -i 5cca4... "/bin/bash"
  </code></pre></li>
  </ol>
  
  <p>At this point, I'm thinking of my container as a sort of remote machine that I can SSH into and work in. </p>
  
  <p>I try to do a <code>git clone</code> from inside the container, but this fails because of a publickey problem. I copy the id_rsa* files into the docker manually, and the clone works. Then I try to edit some source files, but my vim configurations, bash configurations, everything is thrown off because this is a fresh OS environment. What does work really well is my entire dependency versioned build environment. </p>
  
  <hr>
  
  <p>These are the possible solutions I'm thinking of to help me work around this.</p>
  
  <ol>
  <li><p>After pulling the basic image, use a dockerfile to add all the environment variables from the host to the docker. </p>
  
  <p><strong>Cons:</strong> Everytime my host environment changes bash/vim/git I need to update the dockerfile</p></li>
  <li><p>Use a Volume from the host to the container. <strong><em>Git clone and edit files in the host. Run the build scripts and the compilations from inside the docker.</em></strong></p>
  
  <p><strong>Cons:</strong> Content from a data volume cannot be used to update the image if required. I don't know if this is something I should care about anyway.</p></li>
  </ol>
  
  <p>Or am I approaching this the wrong way? </p>