I have an app that executes various fun stuff with Git (like running git clone & git push) and I'm trying to docker-ize it.
I’m having an issue where I need to be able to add an SHH key for the container for the container “user” to be used.
I tried copying it into /root/.ssh/, changing $HOME, creating a git ssh wrapper, and still no luck.
Here is the Dockerfile for reference:
#DOCKER-VERSION 0.3.4                                                           
from  ubuntu:12.04                                                              
RUN  apt-get update                                                             
RUN  apt-get install python-software-properties python g++ make git-core openssh-server -y
RUN  add-apt-repository ppa:chris-lea/node.js                                   
RUN  echo "deb http://archive.ubuntu.com/ubuntu precise universe" >> /etc/apt/sources.list
RUN  apt-get update                                                             
RUN  apt-get install nodejs -y                                                  
ADD . /src                                                                       
ADD ../../home/ubuntu/.ssh/id_rsa /root/.ssh/id_rsa                             
RUN   cd /src; npm install                                                       
EXPOSE  808:808                                                                 
CMD   [ "node", "/src/app.js"]