-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
44 lines (35 loc) · 1008 Bytes
/
Dockerfile
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
# https://hub.docker.com/_/node
ARG node_ver=18
FROM node:${node_ver}-alpine3.18
ARG haraka_ver=3.0.2
ARG build_rev=2
COPY rootfs /
RUN apk update \
&& apk upgrade \
&& apk add --no-cache \
ca-certificates \
&& update-ca-certificates \
\
# Install tools for building Haraka
&& apk add --no-cache --virtual .build-deps \
python3 g++ make \
\
# Build and install Haraka
&& npm install -g Haraka@${haraka_ver} \
&& haraka -i /etc/haraka/ \
# See: https://github.com/haraka/Haraka/issues/2746#issuecomment-580387065
&& sed -i -e 's,^max_unrecognized_commands,#max_unrecognized_commands,' \
/etc/haraka/config/plugins \
\
# Setup entrypoint
&& chmod +x /usr/local/bin/docker-entrypoint.sh \
\
# Cleanup caches and unnecessary stuff
&& apk del .build-deps \
&& rm -rf /var/cache/apk/* \
/root/.npm/* \
/tmp/*
ENV HARAKA_HOME=/etc/haraka
EXPOSE 25 587
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
CMD ["-c", "/etc/haraka"]