Created
August 20, 2015 15:48
-
-
Save aaronhenshaw/5dbf98d4ba915896cd2d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
####################### | |
### SSH KEYS FOR GITHUB | |
####################### | |
# Make ssh dir | |
RUN mkdir /root/.ssh/ | |
# Copy over private key, and set permissions | |
ADD github_rsa /root/.ssh/id_rsa | |
ADD github_rsa.pub /root/.ssh/id_rsa.pub | |
RUN echo "IdentityFile /root/.ssh/id_rsa" >> /etc/ssh/ssh_config | |
RUN ssh-keygen -lf /root/.ssh/id_rsa | |
RUN chmod 600 /root/.ssh/id_rsa | |
# Create known_hosts, add github.com | |
RUN touch /root/.ssh/known_hosts | |
RUN ssh-keyscan github.com >> /root/.ssh/known_hosts | |
############# | |
### PULL REPO | |
############# | |
ENV PROJECT_HOME /project_home/ | |
RUN mkdir ${PROJECT_HOME} | |
RUN git clone git@github.com:Company/repo.git ${PROJECT_HOME}/app |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment