|
| 1 | +FROM neomediatech/ubuntu-base:22.04 |
| 2 | + |
| 3 | +ENV APP_VERSION=3.6 \ |
| 4 | + SERVICE=rspamd |
| 5 | + |
| 6 | +LABEL maintainer=" [email protected]" \ |
| 7 | + org.label-schema.version=$APP_VERSION \ |
| 8 | + org.label-schema.vcs-type=Git \ |
| 9 | + org.label-schema.vcs-url=https://github.com/Neomediatech/${SERVICE} \ |
| 10 | + org.label-schema.maintainer=Neomediatech |
| 11 | + |
| 12 | +RUN apt-get update && apt-get -y dist-upgrade && \ |
| 13 | + apt-get install -y --no-install-recommends \ |
| 14 | + ca-certificates lsb-release wget gnupg && \ |
| 15 | + CODENAME=`lsb_release -c -s` && \ |
| 16 | + wget -O- https://rspamd.com/apt-stable/gpg.key | apt-key add - && \ |
| 17 | + echo "deb [arch=amd64] http://rspamd.com/apt-stable/ $CODENAME main" > /etc/apt/sources.list.d/rspamd.list && \ |
| 18 | + echo "deb-src [arch=amd64] http://rspamd.com/apt-stable/ $CODENAME main" >> /etc/apt/sources.list.d/rspamd.list && \ |
| 19 | + apt-get update && \ |
| 20 | + apt-get --no-install-recommends install -y rspamd && \ |
| 21 | + rm -rf /var/lib/apt/lists/* && \ |
| 22 | + echo 'pidfile = false;' > /etc/rspamd/override.d/options.inc && \ |
| 23 | + mkdir -p /srv/scripts && \ |
| 24 | + wget -O /srv/scripts/logrotate.sh https://raw.githubusercontent.com/Neomediatech/assets/main/scripts/logrotate.sh && \ |
| 25 | + chmod +x /srv/scripts/logrotate.sh |
| 26 | + |
| 27 | +COPY conf/ /etc/rspamd |
| 28 | +COPY entrypoint.sh /entrypoint.sh |
| 29 | +RUN chmod +x /entrypoint.sh |
| 30 | + |
| 31 | +HEALTHCHECK --interval=30s --timeout=30s --start-period=10s --retries=20 CMD rspamadm control stat |grep uptime|head -1 || ( echo "no uptime, no party\!" && exit 1 ) |
| 32 | + |
| 33 | +ENTRYPOINT ["/entrypoint.sh"] |
| 34 | +CMD [ "/usr/bin/rspamd", "-f", "-u", "_rspamd", "-g", "_rspamd" ] |
0 commit comments