Dockerfile 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. FROM golang:1.25-bookworm AS builder
  2. WORKDIR /src
  3. ENV CGO_ENABLED=0 \
  4. GO111MODULE=on \
  5. VERSION=1.8.14
  6. RUN git clone --branch v${VERSION} https://github.com/Zuplu/postfix-tlspol && \
  7. cd /src/postfix-tlspol && \
  8. scripts/build.sh build-only
  9. FROM debian:bookworm-slim
  10. LABEL maintainer="The Infrastructure Company GmbH <info@servercow.de>"
  11. ARG DEBIAN_FRONTEND=noninteractive
  12. ENV LC_ALL=C
  13. RUN apt-get update && apt-get install -y --no-install-recommends \
  14. ca-certificates \
  15. dirmngr \
  16. dnsutils \
  17. iputils-ping \
  18. sudo \
  19. supervisor \
  20. redis-tools \
  21. syslog-ng \
  22. syslog-ng-core \
  23. syslog-ng-mod-redis \
  24. tzdata \
  25. && rm -rf /var/lib/apt/lists/* \
  26. && touch /etc/default/locale
  27. COPY supervisord.conf /etc/supervisor/supervisord.conf
  28. COPY syslog-ng.conf /etc/syslog-ng/syslog-ng.conf
  29. COPY syslog-ng-redis_slave.conf /etc/syslog-ng/syslog-ng-redis_slave.conf
  30. COPY postfix-tlspol.sh /opt/postfix-tlspol.sh
  31. COPY stop-supervisor.sh /usr/local/sbin/stop-supervisor.sh
  32. COPY docker-entrypoint.sh /docker-entrypoint.sh
  33. COPY --from=builder /src/postfix-tlspol/build/postfix-tlspol /usr/local/bin/postfix-tlspol
  34. RUN chmod +x /opt/postfix-tlspol.sh \
  35. /usr/local/sbin/stop-supervisor.sh \
  36. /docker-entrypoint.sh
  37. RUN rm -rf /tmp/* /var/tmp/*
  38. ENTRYPOINT ["/docker-entrypoint.sh"]
  39. CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]