Last active
October 23, 2015 10:36
-
-
Save skatsuta/0f0c24f45c923f316b12 to your computer and use it in GitHub Desktop.
Sample Dockerfile that uses a private repository to build
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
FROM google/golang | |
RUN apt-get update -y && \ | |
apt-get install -y ca-certificates git-core ssh | |
ADD id_rsa /root/.ssh/id_rsa | |
RUN chmod 400 /root/.ssh/id_rsa | |
RUN echo "Host github.com\n\tStrictHostKeyChecking no\n" >> /root/.ssh/config | |
RUN git config --global url.ssh://git@github.com/.insteadOf https://github.com/ | |
CMD ["echo", "Hello, World"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment