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.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. ## build Ergo
  2. FROM golang:1.16-alpine AS build-env
  3. RUN apk add --no-cache git make curl sed
  4. # copy ergo
  5. RUN mkdir -p /go/src/github.com/ergochat/ergo
  6. WORKDIR /go/src/github.com/ergochat/ergo
  7. ADD . /go/src/github.com/ergochat/ergo/
  8. # modify default config file so that it doesn't die on IPv6
  9. # and so it can be exposed via 6667 by default
  10. run sed -i 's/^\(\s*\)\"127.0.0.1:6667\":.*$/\1":6667":/' /go/src/github.com/ergochat/ergo/default.yaml
  11. run sed -i 's/^\s*\"\[::1\]:6667\":.*$//' /go/src/github.com/ergochat/ergo/default.yaml
  12. # compile
  13. RUN make
  14. ## run Ergo
  15. FROM alpine:3.9
  16. # metadata
  17. LABEL maintainer="daniel@danieloaks.net"
  18. LABEL description="Ergo is a modern, experimental IRC server written in Go"
  19. # install latest updates and configure alpine
  20. RUN apk update
  21. RUN apk upgrade
  22. RUN mkdir /lib/modules
  23. # standard ports listened on
  24. EXPOSE 6667/tcp 6697/tcp
  25. # oragono itself
  26. RUN mkdir -p /ircd-bin
  27. COPY --from=build-env /go/bin/ergo /ircd-bin
  28. COPY --from=build-env /go/src/github.com/ergochat/ergo/languages /ircd-bin/languages/
  29. COPY --from=build-env /go/src/github.com/ergochat/ergo/default.yaml /ircd-bin/default.yaml
  30. COPY distrib/docker/run.sh /ircd-bin/run.sh
  31. RUN chmod +x /ircd-bin/run.sh
  32. # running volume holding config file, db, certs
  33. VOLUME /ircd
  34. WORKDIR /ircd
  35. # default motd
  36. COPY --from=build-env /go/src/github.com/ergochat/ergo/ergo.motd /ircd/ergo.motd
  37. # launch
  38. ENTRYPOINT ["/ircd-bin/run.sh"]
  39. # # uncomment to debug
  40. # RUN apk add --no-cache bash
  41. # RUN apk add --no-cache vim
  42. # CMD /bin/bash