15 lines
531 B
Docker
15 lines
531 B
Docker
FROM golang:1.6-alpine
|
|
|
|
MAINTAINER Bo-Yi Wu <appleboy.tw@gmail.com>
|
|
|
|
ENV VERSION #VERSION#
|
|
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
|
|
RUN GOOS=linux GOARCH=amd64 go build -ldflags="-s -w -X main.Version=${VERSION}" -o bin/gorush gorush.go
|
|
|
|
CMD tar -C bin -czf - gorush
|