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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. ## build ergo binary
  2. FROM docker.io/golang:1.22-alpine AS build-env
  3. RUN apk upgrade -U --force-refresh --no-cache && apk add --no-cache --purge --clean-protected -l -u make git
  4. # copy ergo source
  5. WORKDIR /go/src/github.com/ergochat/ergo
  6. COPY . .
  7. # modify default config file so that it doesn't die on IPv6
  8. # and so it can be exposed via 6667 by default
  9. RUN sed -i 's/^\(\s*\)\"127.0.0.1:6667\":.*$/\1":6667":/' /go/src/github.com/ergochat/ergo/default.yaml && \
  10. sed -i 's/^\s*\"\[::1\]:6667\":.*$//' /go/src/github.com/ergochat/ergo/default.yaml
  11. # compile
  12. RUN make install
  13. ## build ergo container
  14. FROM docker.io/alpine:3.19
  15. # metadata
  16. LABEL maintainer="Daniel Oaks <daniel@danieloaks.net>,Daniel Thamdrup <dallemon@protonmail.com>" \
  17. description="Ergo is a modern, experimental IRC server written in Go"
  18. # standard ports listened on
  19. EXPOSE 6667/tcp 6697/tcp
  20. # ergo itself
  21. COPY --from=build-env /go/bin/ergo \
  22. /go/src/github.com/ergochat/ergo/default.yaml \
  23. /go/src/github.com/ergochat/ergo/distrib/docker/run.sh \
  24. /ircd-bin/
  25. COPY --from=build-env /go/src/github.com/ergochat/ergo/languages /ircd-bin/languages/
  26. # running volume holding config file, db, certs
  27. VOLUME /ircd
  28. WORKDIR /ircd
  29. # default motd
  30. COPY --from=build-env /go/src/github.com/ergochat/ergo/ergo.motd /ircd/ergo.motd
  31. # launch
  32. ENTRYPOINT ["/ircd-bin/run.sh"]
  33. # # uncomment to debug
  34. # RUN apk add --no-cache bash
  35. # RUN apk add --no-cache vim
  36. # CMD /bin/bash