Created
March 11, 2016 05:08
-
-
Save jpillora/640b475f02edb746b773 to your computer and use it in GitHub Desktop.
small generic Go (golang) docker file (~11MB)
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 alpine | |
MAINTAINER [email protected] | |
#configure go path | |
ENV GOPATH /root/go | |
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin | |
#package | |
ENV PACKAGE github.com/jpillora/ssh-tron | |
#install go and deps, then package, | |
#move build binaries out then wipe build tools | |
RUN apk update && \ | |
apk add git go gzip && \ | |
go get -v $PACKAGE && \ | |
mv $GOPATH/bin/* /usr/local/bin/ && \ | |
rm -rf $GOPATH && \ | |
apk del git go gzip && \ | |
echo "Installed $PACKAGE" | |
#alternatively, git clone into $GOPATH/src, | |
#then go get -u $PACKAGE to update deps | |
#run package | |
CMD ["ssh-tron"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment