2023-07-22 11:31:48 +00:00
|
|
|
FROM debian:bullseye-slim
|
2023-02-24 15:28:02 +00:00
|
|
|
|
2023-07-23 06:45:57 +00:00
|
|
|
RUN apt-get update -y && apt-get install -yq ca-certificates curl
|
2023-02-24 15:28:02 +00:00
|
|
|
|
2023-07-22 11:31:48 +00:00
|
|
|
COPY main/resources/docker/configure.sh /usr/local/bin/configure.sh
|
|
|
|
COPY main/resources/docker/entrypoint.sh /usr/local/bin/entrypoint.sh
|
2023-02-24 15:28:02 +00:00
|
|
|
|
2023-07-23 06:45:57 +00:00
|
|
|
RUN sed -i -e 's/__C__/smtp/g' /usr/local/bin/configure.sh && \
|
|
|
|
sed -i -e 's/__R__/smtp-server/g' /usr/local/bin/configure.sh && \
|
2023-08-09 17:54:52 +00:00
|
|
|
sed -i -e 's/__N__/smtp/g' /usr/local/bin/configure.sh && \
|
|
|
|
sed -i -e 's/__B__/stalwart-smtp/g' /usr/local/bin/entrypoint.sh
|
2023-07-23 06:45:57 +00:00
|
|
|
|
2023-07-22 11:31:48 +00:00
|
|
|
RUN chmod a+rx /usr/local/bin/*.sh
|
2023-02-24 15:28:02 +00:00
|
|
|
|
2023-07-23 06:45:57 +00:00
|
|
|
RUN /usr/local/bin/configure.sh --download
|
|
|
|
|
2023-07-22 11:31:48 +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-02-24 15:28:02 +00:00
|
|
|
|
2023-07-27 18:39:32 +00:00
|
|
|
VOLUME [ "/opt/stalwart-mail" ]
|
|
|
|
|
|
|
|
EXPOSE 25 587 465 8080
|
2023-02-24 15:28:02 +00:00
|
|
|
|
2023-07-22 11:31:48 +00:00
|
|
|
ENTRYPOINT ["/bin/sh", "/usr/local/bin/entrypoint.sh"]
|