Dockerfile 1.3 KB

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