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.

33 lines
574B

  1. FROM golang:1.10-alpine as build
  2. # args
  3. ARG version="1.0.1"
  4. ARG repo="github.com/productionwentdown/text-server"
  5. # source
  6. WORKDIR $GOPATH/src/${repo}
  7. COPY . .
  8. # build
  9. ENV CGO_ENABLED=0
  10. ENV GOOS=linux
  11. ENV GOARCH=amd64
  12. RUN go build -ldflags "-s -w" -o /text-server
  13. FROM scratch
  14. ARG version
  15. # labels
  16. LABEL org.label-schema.vcs-url="https://github.com/productionwentdown/text-server"
  17. LABEL org.label-schema.version=${version}
  18. LABEL org.label-schema.schema-version="1.0"
  19. # copy binary
  20. COPY --from=build /text-server /text-server
  21. EXPOSE 8080
  22. ENTRYPOINT ["/text-server"]