forked from nats-io/nats-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.all
15 lines (11 loc) · 1.24 KB
/
Dockerfile.all
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
FROM golang:1.11
MAINTAINER Ivan Kozlovic <[email protected]>
COPY . /go/src/github.com/nats-io/gnatsd
WORKDIR /go/src/github.com/nats-io/gnatsd
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -a -tags netgo -installsuffix netgo -ldflags "-s -w -X github.com/nats-io/gnatsd/server.gitCommit=`git rev-parse --short HEAD`" -o pkg/linux-amd64/gnatsd
RUN CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=6 go build -v -a -tags netgo -installsuffix netgo -ldflags "-s -w -X github.com/nats-io/gnatsd/server.gitCommit=`git rev-parse --short HEAD`" -o pkg/linux-arm6/gnatsd
RUN CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=7 go build -v -a -tags netgo -installsuffix netgo -ldflags "-s -w -X github.com/nats-io/gnatsd/server.gitCommit=`git rev-parse --short HEAD`" -o pkg/linux-arm7/gnatsd
RUN CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -v -a -tags netgo -installsuffix netgo -ldflags "-s -w -X github.com/nats-io/gnatsd/server.gitCommit=`git rev-parse --short HEAD`" -o pkg/linux-arm64/gnatsd
RUN CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -v -a -tags netgo -installsuffix netgo -ldflags "-s -w -X github.com/nats-io/gnatsd/server.gitCommit=`git rev-parse --short HEAD`" -o pkg/win-amd64/gnatsd.exe
ENTRYPOINT ["go"]
CMD ["version"]