gorush/docker/Dockerfile.build

13 lines
405 B
Docker
Raw Normal View History

FROM appleboy/golang-testing
MAINTAINER Bo-Yi Wu <appleboy.tw@gmail.com>
ENV VERSION #VERSION#
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 install
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