Dockerfile 638 B

123456789101112131415161718192021222324252627282930313233
  1. FROM golang:1.19.5-alpine as build
  2. RUN apk add --no-cache git tar
  3. WORKDIR /go/src/github.com/abh/geodns
  4. ENV CGO_ENABLED=0
  5. ADD applog/ applog/
  6. ADD countries/ countries/
  7. ADD geodns-logs/ geodns-logs/
  8. ADD health/ health/
  9. ADD monitor/ monitor/
  10. ADD querylog/ querylog/
  11. ADD server/ server/
  12. ADD targeting/ targeting/
  13. ADD typeutil/ typeutil/
  14. ADD zones/ zones/
  15. ADD service/ service/
  16. ADD service-logs/ service-logs/
  17. ADD .git/ .git/
  18. ADD *.go build ./
  19. RUN ./build
  20. RUN ls -l
  21. RUN ls -l dist
  22. RUN ln dist/* /
  23. FROM scratch
  24. COPY --from=build /geodns-linux-amd64 /geodns
  25. COPY --from=build /geodns-logs-linux-amd64 /geodns-logs
  26. ENTRYPOINT ["/geodns"]