mail-server/Dockerfile

26 lines
839 B
Docker
Raw Normal View History

2023-07-22 11:08:08 +00:00
FROM debian:bullseye-slim
2023-07-11 15:16:08 +00:00
2023-07-23 06:43:04 +00:00
RUN apt-get update -y && apt-get install -yq ca-certificates curl
2023-07-11 15:16:08 +00:00
2023-07-22 11:08:08 +00:00
COPY resources/docker/configure.sh /usr/local/bin/configure.sh
COPY resources/docker/entrypoint.sh /usr/local/bin/entrypoint.sh
2023-07-11 15:16:08 +00:00
2023-07-23 06:43:04 +00:00
RUN sed -i -e 's/__C__/all-in-one/g' /usr/local/bin/configure.sh && \
sed -i -e 's/__R__/mail-server/g' /usr/local/bin/configure.sh && \
2023-12-27 13:58:24 +00:00
sed -i -e 's/__N__/mail/g' /usr/local/bin/configure.sh && \
2023-08-08 16:29:43 +00:00
sed -i -e 's/__B__/stalwart-mail/g' /usr/local/bin/entrypoint.sh
2023-07-23 06:43:04 +00:00
2023-07-22 11:08:08 +00:00
RUN chmod a+rx /usr/local/bin/*.sh
2023-07-11 15:16:08 +00:00
2023-07-23 06:43:04 +00:00
RUN /usr/local/bin/configure.sh --download
2023-07-11 15:16:08 +00:00
RUN useradd stalwart-mail -s /sbin/nologin -M
RUN mkdir -p /opt/stalwart-mail
RUN chown stalwart-mail:stalwart-mail /opt/stalwart-mail
2023-07-27 18:18:34 +00:00
VOLUME [ "/opt/stalwart-mail" ]
2024-01-08 13:28:11 +00:00
EXPOSE 443 25 587 465 143 993 4190
2023-07-11 15:16:08 +00:00
2023-07-22 11:08:08 +00:00
ENTRYPOINT ["/bin/sh", "/usr/local/bin/entrypoint.sh"]