File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -5,13 +5,16 @@ ARG DOVECOT_UID=4006
55ARG DOVECOT_GID=4006
66RUN apt-get update && apt-get install -qy dovecot-core dovecot-imapd
77
8+ RUN groupadd -g ${VMAIL_GID} vmail && \
9+ useradd -u $VMAIL_UID -g vmail -s /bin/false vmail && \
10+ mkdir /mail && \
11+ chown -R vmail:vmail /mail
12+
813RUN groupadd postfix -g $POSTFIX_GID && \
914 useradd postfix -u ${POSTFIX_UID} -g postfix -s /bin/false && \
1015 gpasswd -a mail postfix
1116
1217RUN groupmod dovecot -g ${DOVECOT_GID} && \
1318 usermod dovecot -u $DOVECOT_UID -g $DOVECOT_GID -s /bin/false
1419
15- USER dovecot
16-
1720CMD [ "/usr/sbin/dovecot" , "-F" ]
Original file line number Diff line number Diff line change @@ -4,13 +4,18 @@ ARG POSTFIX_UID=4005
44ARG POSTFIX_GID=4005
55ARG DOVECOT_UID=4006
66ARG DOVECOT_GID=4006
7+ ARG VMAIL_UID=4007
8+ ARG VMAIL_GID=4007
79RUN apt-get update && apt-get install -qy postfix
810
11+ RUN groupadd -g ${VMAIL_GID} vmail && \
12+ useradd -u $VMAIL_UID -g vmail -s /bin/false vmail && \
13+ mkdir /mail && \
14+ chown -R vmail:vmail /mail
15+
916RUN groupadd -g ${DOVECOT_GID} dovecot && \
1017 useradd -u $DOVECOT_UID -g dovecot -s /bin/false dovecot
1118RUN groupmod -g ${POSTFIX_GID} postfix && \
1219 usermod -u ${POSTFIX_UID} -g ${POSTFIX_GID} postfix
1320
14- USER postfix
15-
1621CMD [ "/usr/sbin/postfix" "start-fg" ]
You can’t perform that action at this time.
0 commit comments