2016-04-11 08:38:59 +00:00
|
|
|
FROM golang:1.6-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-05-04 07:32:51 +00:00
|
|
|
RUN apk --update add git make
|
|
|
|
RUN go get github.com/Masterminds/glide && cd $GOPATH/src/github.com/Masterminds/glide && make install
|
|
|
|
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
|
|
|
|
RUN make bundle
|
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
|