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.

Dockerfile 899B

1234567891011121314151617181920212223242526272829
  1. # This is a multi-part build that first statically builds irccat, and then
  2. # copies over the resulting binary and the default SSL root certs over into
  3. # a 'scratch' image, resulting in a very small image.
  4. #
  5. # You must provide a config file at /etc/irccat.[json|yaml|toml|hcl], for
  6. # example:
  7. #
  8. # docker build . -t irccat
  9. # docker run -d -P -v /path/to/my/config/irccat.json:/etc/irccat.json irccat
  10. #
  11. # (This will also expose the default ports: 12345 and 8045.)
  12. # Step one: fetch deps and build
  13. FROM golang:latest AS build
  14. ADD . /go/src/github.com/irccloud/irccat
  15. WORKDIR /go/src/github.com/irccloud/irccat
  16. RUN CGO_ENABLED=0 go get -t -v ./... && go build -a .
  17. # Step two: copy over the binary and root certs
  18. FROM scratch
  19. COPY --from=build /go/bin/irccat /irccat
  20. COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
  21. EXPOSE 12345
  22. EXPOSE 8045
  23. CMD ["/irccat"]