oneuptime/Haraka/Dockerfile.tpl
Simon Larsen c470abf36c
feat: Add host_list.ini configuration file and update email_parser.js plugin
The code changes include adding a new configuration file `host_list.ini` to the Haraka config directory. This file will be used to store a list of allowed hosts for incoming emails. Additionally, the `email_parser.js` plugin file has been moved to the correct directory in the Haraka config. This update ensures that the email parsing functionality is properly configured and the list of allowed hosts is maintained.
2024-05-30 20:12:07 +01:00

53 lines
1.4 KiB
Smarty

FROM node:21.7.3-alpine3.18
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
ARG GIT_SHA
ARG APP_VERSION
ENV GIT_SHA=${GIT_SHA}
ENV APP_VERSION=${APP_VERSION}
# IF APP_VERSION is not set, set it to 1.0.0
RUN if [ -z "$APP_VERSION" ]; then export APP_VERSION=1.0.0; fi
RUN apk add bash
# install dependence
RUN apk upgrade --update && \
apk add --no-cache -t .fetch-deps \
autoconf \
g++ \
bash \
curl \
gcc \
make \
python3 && \
addgroup -g 88 -S smtp && \
adduser -u 88 -D -S -G smtp -h /harakaapp smtp && \
# Install haraka and toobusy package
npm install -g --unsafe-perm Haraka toobusy-js && \
# # Cleaning up
apk del --purge -r .fetch-deps && \
apk add --no-cache tzdata openssl execline ca-certificates && \
rm -rf /var/cache/apk/* /tmp/* ~/.pearrc
RUN haraka -i /harakaapp
COPY ./Haraka/config/plugins /harakaapp/config/plugins
COPY ./Haraka/config/smtp.ini /harakaapp/config/smtp.ini
COPY ./Haraka/config/tls.ini /harakaapp/config/tls.ini
COPY ./Haraka/config/auth_flat_file.ini /harakaapp/config/auth_flat_file.ini
COPY ./Haraka/config/dkim_sign.ini /harakaapp/config/dkim_sign.ini
COPY ./Haraka/config/host_list.ini /harakaapp/config/host_list.ini
COPY ./Haraka/plugins/email_parser.js /harakaapp/config/email_parser.js
COPY ./Haraka/init.sh /init.sh
RUN chmod 755 /init.sh
EXPOSE 2525
CMD ["/init.sh"]