Dockerfile 275 B

12345678910111213141516
  1. FROM golang:1.11 AS builder
  2. ENV CGO_ENABLED 0
  3. ENV GOOS linux
  4. WORKDIR $GOPATH/src/zero
  5. COPY . .
  6. RUN go build -ldflags="-s -w" -o /app/unaryproxy example/rpc/proxy/proxy.go
  7. FROM alpine
  8. WORKDIR /app
  9. COPY --from=builder /app/unaryproxy /app/unaryproxy
  10. CMD ["./unaryproxy"]