Made $username a build argument.
This commit is contained in:
parent
f14099054a
commit
aeb08bd4db
@ -1,3 +1,4 @@
|
|||||||
|
# Based on official Dockerfile: https://github.com/dovecot/docker
|
||||||
FROM alpine:3
|
FROM alpine:3
|
||||||
|
|
||||||
LABEL org.opencontainers.image.authors="markus@birth-online.de"
|
LABEL org.opencontainers.image.authors="markus@birth-online.de"
|
||||||
@ -5,6 +6,8 @@ LABEL org.opencontainers.image.authors="markus@birth-online.de"
|
|||||||
ENV container=docker \
|
ENV container=docker \
|
||||||
LC_ALL=C
|
LC_ALL=C
|
||||||
|
|
||||||
|
ARG username=vmail
|
||||||
|
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
tini \
|
tini \
|
||||||
dovecot \
|
dovecot \
|
||||||
@ -21,9 +24,9 @@ RUN apk add --no-cache \
|
|||||||
mkdir /conf && \
|
mkdir /conf && \
|
||||||
echo "!include_try /conf/*.conf" >> /etc/dovecot/dovecot.conf && \
|
echo "!include_try /conf/*.conf" >> /etc/dovecot/dovecot.conf && \
|
||||||
mkdir /data && \
|
mkdir /data && \
|
||||||
addgroup -g 1000 vmail && \
|
addgroup -g 1000 $username && \
|
||||||
adduser -h /data -u 1000 -D -G vmail vmail && \
|
adduser -h /data -u 1000 -D -G $username $username && \
|
||||||
chown vmail:vmail /data
|
chown 1000:1000 /data
|
||||||
|
|
||||||
COPY local.conf /conf/local.conf
|
COPY local.conf /conf/local.conf
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
## You should mount /etc/dovecot if you want to
|
## You should mount /conf if you want to
|
||||||
## manage this file
|
## manage this file
|
||||||
|
|
||||||
mail_home=/data/%Lu
|
mail_home=/data/%Lu
|
||||||
|
Loading…
x
Reference in New Issue
Block a user