eggdrop.Dockerfile 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. ######################################################
  2. # define builder stage to build and prepare everything
  3. ######################################################
  4. FROM eggdrop:1.8.4 as builder
  5. # install qstat build dependencies
  6. RUN apk add --no-cache git build-base automake autoconf
  7. # get the qstat source code with git
  8. RUN git clone https://github.com/multiplay/qstat.git
  9. # check out the tested version; remove if you want latest
  10. RUN cd qstat && \
  11. git checkout 85fbecb117e90e1029c1bfa0ca9bc610a67d41af
  12. # build the qstat binary
  13. RUN cd qstat && \
  14. ./autogen.sh && \
  15. ./configure && \
  16. make CFLAGS=-O0 # -O0 is a workaround for a compile error
  17. ######################################################
  18. # define runtime stage to build the runtime image
  19. ######################################################
  20. FROM eggdrop:1.8.4 as runtime
  21. # copy the scripts into the image
  22. COPY --chown=eggdrop:nogroup \
  23. ["./scripts/*.tcl", "/home/eggdrop/eggdrop/scripts/"]
  24. # copy qstat binary from builder
  25. COPY --from=builder \
  26. --chown=eggdrop:nogroup \
  27. ["/home/eggdrop/eggdrop/qstat/qstat", "/usr/local/bin/"]
  28. # install other script dependencies
  29. RUN apk add --no-cache bind-tools libpq
  30. # add scripts to the config
  31. RUN echo "" >> eggdrop.conf && \
  32. echo "# start of scripts from repository" >> eggdrop.conf && \
  33. echo "source scripts/auth.tcl" >> eggdrop.conf && \
  34. echo "source scripts/beer.tcl" >> eggdrop.conf && \
  35. echo "source scripts/date.tcl" >> eggdrop.conf && \
  36. echo "source scripts/funwar.tcl" >> eggdrop.conf && \
  37. echo "source scripts/greetings.tcl" >> eggdrop.conf && \
  38. echo "source scripts/help.tcl" >> eggdrop.conf && \
  39. echo "source scripts/host.tcl" >> eggdrop.conf && \
  40. echo "source scripts/insult.tcl" >> eggdrop.conf && \
  41. echo "source scripts/maketiny.tcl" >> eggdrop.conf && \
  42. echo "source scripts/match.tcl" >> eggdrop.conf && \
  43. echo "source scripts/qstat.tcl" >> eggdrop.conf && \
  44. echo "source scripts/topic.tcl" >> eggdrop.conf && \
  45. echo "source scripts/watch.tcl" >> eggdrop.conf && \
  46. echo "# end of scripts from repository" >> eggdrop.conf && \
  47. echo "" >> eggdrop.conf
  48. # the original entrypoint.sh from eggrop:1.8.4 changes the dns setting to an
  49. # external dns address; disable this with a hack
  50. RUN sed -i \
  51. -e 's/^#set dns-servers "8.8.8.8 8.8.4.4"/#set dns-servers "127.0.0.11"/' \
  52. eggdrop.conf