forked from stalwartlabs/imap-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
25 lines (16 loc) · 844 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
FROM debian:bullseye-slim
RUN apt-get update -y && apt-get install -yq ca-certificates curl
COPY main/resources/docker/configure.sh /usr/local/bin/configure.sh
COPY main/resources/docker/entrypoint.sh /usr/local/bin/entrypoint.sh
RUN sed -i -e 's/__C__/imap/g' /usr/local/bin/configure.sh && \
sed -i -e 's/__R__/imap-server/g' /usr/local/bin/configure.sh && \
sed -i -e 's/__N__/imap/g' /usr/local/bin/configure.sh && \
sed -i -e 's/__B__/stalwart-imap/g' /usr/local/bin/entrypoint.sh
RUN chmod a+rx /usr/local/bin/*.sh
RUN /usr/local/bin/configure.sh --download
RUN useradd stalwart-mail -s /sbin/nologin -M
RUN mkdir -p /opt/stalwart-mail
RUN chown stalwart-mail:stalwart-mail /opt/stalwart-mail
VOLUME [ "/opt/stalwart-mail" ]
EXPOSE 8080 25 587 465 143 993 4190
ENTRYPOINT ["/bin/sh", "/usr/local/bin/entrypoint.sh"]