2016-05-11 12:20:48 +00:00
|
|
|
FROM golang:1.6.2-alpine
|
2016-03-27 12:20:57 +00:00
|
|
|
|
|
|
|
MAINTAINER Bo-Yi Wu <appleboy.tw@gmail.com>
|
|
|
|
|
2016-05-09 07:09:58 +00:00
|
|
|
ENV VERSION #VERSION#
|
2016-07-19 14:20:23 +00:00
|
|
|
RUN apk --update add git make curl
|
2016-05-04 07:32:51 +00:00
|
|
|
RUN mkdir -p $GOPATH/src/github.com/appleboy/gorush
|
|
|
|
Add build.tar.gz $GOPATH/src/github.com/appleboy/gorush/
|
|
|
|
WORKDIR $GOPATH/src/github.com/appleboy/gorush
|
2016-07-19 14:20:23 +00:00
|
|
|
RUN make install
|
2016-05-09 07:09:58 +00:00
|
|
|
RUN GOOS=linux GOARCH=amd64 go build -ldflags="-s -w -X main.Version=${VERSION}" -o bin/gorush gorush.go
|
2016-03-27 12:20:57 +00:00
|
|
|
|
2016-04-13 07:22:04 +00:00
|
|
|
CMD tar -C bin -czf - gorush
|