You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
294 B

  1. FROM golang:1.9-alpine as go
  2. WORKDIR /go/src/text-server
  3. COPY . .
  4. ENV CGO_ENABLED=0
  5. ENV GOOS=linux
  6. ENV GOARCH=amd64
  7. RUN go build -ldflags '-extldflags "-static"' -o text-server
  8. FROM scratch
  9. EXPOSE 8080
  10. COPY --from=go /go/src/text-server/text-server text-server
  11. ENTRYPOINT ["/text-server"]