-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile.FromSource
62 lines (47 loc) · 1.98 KB
/
Dockerfile.FromSource
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
ARG JEM
#FROM alpine:edge as jem-builder
#WORKDIR /tmp
#COPY travis-helpers/build-apk-native.sh travis-helpers/pull-apk-source.sh /usr/local/bin/
#COPY newfiles/* APKBUILD.patch.je? ./
#RUN if [ -f APKBUILD.patch.jem ]; then mv APKBUILD.patch.jem APKBUILD.patch; fi \
#&& mkdir -p /tmp/packages && touch /tmp/packages/.placeholder \
#&& [ -n ${JEM} ] && build-apk-native.sh unmaintained/jemalloc
FROM alpine:edge as rspamd-builder
#COPY --from=jem-builder /tmp/packages/* /tmp/packages/
WORKDIR /tmp
COPY travis-helpers/just-build.sh /usr/local/bin/
#copy rspamd aport files
COPY rspamd/* ./
#RUN echo '/tmp/packages' >> /etc/apk/repositories \
#&& [ -n ${JEM} ] && apk add --allow-untrusted jemalloc-dev \
#&& touch /tmp/jem \
RUN just-build.sh
FROM alpine:edge
LABEL maintainer="Duncan Bellamy <[email protected]>"
COPY --from=rspamd-builder /tmp/packages/* /tmp/packages/
RUN ls -lah /tmp/packages
ENV dqsver master
# hadolint ignore=DL3018
RUN cp /etc/apk/repositories /etc/apk/repositories.orig \
&& echo '/tmp/packages' >> /etc/apk/repositories \
&& chown -R root:root /tmp/packages \
&& apk add --no-cache --allow-untrusted -u rspamd rspamd-controller rspamd-fuzzy rspamd-proxy drill stunnel \
&& mkdir /run/rspamd && chown rspamd:rspamd /run/rspamd \
&& mkdir /run/stunnel && chown stunnel:stunnel /run/stunnel \
&& mv /etc/apk/repositories.orig /etc/apk/repositories
WORKDIR /tmp
# hadolint ignore=DL3059
RUN wget -q https://github.com/spamhaus/rspamd-dqs/archive/${dqsver}.tar.gz \
&& tar -xzf ${dqsver}.tar.gz \
&& mv rspamd-dqs-*/2.x /etc/rspamd/rspamd-dqs \
&& rm -Rf ./*
WORKDIR /usr/local/bin
COPY travis-helpers/set-timezone.sh entrypoint.sh update_bazaar.sh update_sa_heinlein.sh update_sa_heinlein_daemon.sh ./
WORKDIR /etc/rspamd/local.d
COPY local.conf ./
WORKDIR /etc/rspamd/local.d/maps.orig
COPY --chown=rspamd:rspamd maps/* ./
COPY stunnel.conf /etc/stunnel/stunnel.conf
CMD [ "entrypoint.sh" ]
VOLUME /var/lib/rspamd /etc/rspamd/override.d /etc/rspamd/local.d/maps.d
EXPOSE 11332 11334