Skip to content

Instantly share code, notes, and snippets.

@transcranial
Created April 15, 2015 21:41
Show Gist options
  • Save transcranial/f7b0205175dca6d56377 to your computer and use it in GitHub Desktop.
Save transcranial/f7b0205175dca6d56377 to your computer and use it in GitHub Desktop.
Git SSH within Docker
RUN mkdir -p /root/.ssh
ADD /path/to/id_rsa /root/.ssh/id_rsa
RUN chmod 600 /root/.ssh/id_rsa
RUN ssh-keyscan github.com >> /root/.ssh/known_hosts
RUN git clone [email protected]:ORG/REPO.git /var/path/to/repo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment