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 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. ## build Oragono
  2. FROM golang:rc-alpine AS build-env
  3. RUN apk add --no-cache git make curl
  4. # install goreleaser
  5. RUN mkdir -p /go/src/github.com/goreleaser
  6. WORKDIR /go/src/github.com/goreleaser
  7. RUN git clone https://github.com/goreleaser/goreleaser.git
  8. WORKDIR /go/src/github.com/goreleaser/goreleaser
  9. RUN make setup build
  10. RUN cp ./goreleaser /usr/bin
  11. # get oragono
  12. RUN mkdir -p /go/src/github.com/oragono
  13. WORKDIR /go/src/github.com/oragono
  14. RUN git clone --recurse-submodules https://github.com/oragono/oragono.git
  15. WORKDIR /go/src/github.com/oragono/oragono
  16. # compile
  17. RUN make build
  18. ## run Oragono
  19. FROM alpine:3.9
  20. # metadata
  21. LABEL maintainer="daniel@danieloaks.net"
  22. LABEL description="Oragono is a modern, experimental IRC server written in Go"
  23. # install latest updates and configure alpine
  24. RUN apk update
  25. RUN apk upgrade
  26. RUN mkdir /lib/modules
  27. # standard ports listened on
  28. EXPOSE 6667/tcp 6697/tcp
  29. # oragono itself
  30. RUN mkdir -p /ircd-bin
  31. COPY --from=build-env /go/src/github.com/oragono/oragono/dist/linux_amd64/oragono /ircd-bin
  32. COPY --from=build-env /go/src/github.com/oragono/oragono/languages /ircd-bin/languages/
  33. COPY --from=build-env /go/src/github.com/oragono/oragono/oragono.yaml /ircd-bin/oragono.yaml
  34. COPY run.sh /ircd-bin/run.sh
  35. RUN chmod +x /ircd-bin/run.sh
  36. # running volume holding config file, db, certs
  37. VOLUME /ircd
  38. WORKDIR /ircd
  39. # default motd
  40. COPY --from=build-env /go/src/github.com/oragono/oragono/oragono.motd /ircd/oragono.motd
  41. # launch
  42. ENTRYPOINT ["/ircd-bin/run.sh"]
  43. # # uncomment to debug
  44. # RUN apk add --no-cache bash
  45. # RUN apk add --no-cache vim
  46. # CMD /bin/bash