File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,12 @@ ARG POSTFIX_GID=4005
44ARG DOVECOT_UID=4006
55ARG DOVECOT_GID=4006
66RUN apt-get update && apt-get install -qy dovecot-core dovecot-imapd
7- RUN useradd -u $POSTFIX_UID -g $POSTFIX_GID -s /bin/false postfix
8- RUN useradd -u $DOVECOT_UID -g $DOVECOT_GID -s /bin/false dovecot
7+
8+ RUN groupadd postfix -g $POSTFIX_GID && \
9+ useradd postfix -u ${POSTFIX_UID} -g postfix -s /bin/false && \
10+ gpasswd -a mail postfix
11+
12+ RUN groupmod dovecot -g ${DOVECOT_GID} && \
13+ usermod dovecot -u $DOVECOT_UID -g $DOVECOT_GID -s /bin/false
914
1015CMD [ "/usr/sbin/dovecot" , "-F" ]
Original file line number Diff line number Diff line change @@ -4,8 +4,11 @@ ARG POSTFIX_UID=4005
44ARG POSTFIX_GID=4005
55ARG DOVECOT_UID=4006
66ARG DOVECOT_GID=4006
7- RUN apt-get update && apt-get install -qy postfix dovecot-core dovecot-imapd
8- RUN useradd -u $POSTFIX_UID -g $POSTFIX_GID -s /bin/false postfix
9- RUN useradd -u $DOVECOT_UID -g $DOVECOT_GID -s /bin/false dovecot
7+ RUN apt-get update && apt-get install -qy postfix
8+
9+ RUN groupadd -g ${DOVECOT_GID} dovecot && \
10+ useradd -u $DOVECOT_UID -g dovecot -s /bin/false dovecot
11+ RUN groupmod -g ${POSTFIX_GID} postfix && \
12+ usermod -u ${POSTFIX_UID} -g ${POSTFIX_GID} postfix
1013
1114CMD [ "/usr/sbin/postfix" "start-fg" ]
You can’t perform that action at this time.
0 commit comments