Created
September 10, 2020 05:12
-
-
Save stanlee321/ca9899bdd3f0df3c819b2c6740bcd9ce to your computer and use it in GitHub Desktop.
docker-golang-private-repos
This file contains hidden or 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 golang | |
| RUN apt-get update && apt-get install -y ca-certificates git-core ssh | |
| ADD keys/my_key_rsa /root/.ssh/id_rsa | |
| RUN chmod 700 /root/.ssh/id_rsa | |
| RUN echo "Host github.com\n\tStrictHostKeyChecking no\n" >> /root/.ssh/config | |
| RUN git config --global url.ssh://[email protected]/.insteadOf https://github.com/ | |
| ADD . /go/src/github.com/myaccount/myprivaterepo | |
| RUN go get github.com/myaccount/myprivaterepo | |
| RUN go install github.com/myaccount/myprivaterepo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment