FROM golang:1.13 as build
ENV GOPROXY https://goproxy.cn
ENV GO111MODULE on
WORKDIR /go/ability
ADD go.mod .
ADD go.sum .
RUN go mod download
RUN GOOS=linux CGO_ENABLED=0 go build -ldflags="-s -w" -installsuffix cgo -o examples_gocomm main.go
CMD ["/ability"]