Initial: stack mail Postfix + Dovecot sur Alpine
This commit is contained in:
commit
24cf567d9a
5 changed files with 98 additions and 0 deletions
22
dovecot/Dockerfile
Normal file
22
dovecot/Dockerfile
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# Image de base Alpine
|
||||
FROM alpine:3.21
|
||||
|
||||
# Installer Dovecot (IMAP/POP3) + le module d'authentification
|
||||
RUN apk add --no-cache dovecot
|
||||
|
||||
# --- Utilisateur vmail identique à celui de Postfix (uid/gid 5000) ---
|
||||
RUN (deluser vmail 2>/dev/null || true) \
|
||||
&& (delgroup vmail 2>/dev/null || true) \
|
||||
&& addgroup -g 5000 vmail \
|
||||
&& adduser -D -u 5000 -G vmail -h /var/mail/vhosts vmail \
|
||||
&& mkdir -p /var/mail/vhosts
|
||||
|
||||
# --- Copier nos fichiers de config dans l'image ---
|
||||
COPY dovecot.conf /etc/dovecot/dovecot.conf
|
||||
COPY users /etc/dovecot/users
|
||||
|
||||
# Exposer les ports IMAP
|
||||
EXPOSE 143 993
|
||||
|
||||
# Lancer Dovecot au premier plan
|
||||
CMD ["dovecot", "-F"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue