fix: permission issue caused by root owning the volume

Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
This commit is contained in:
Mark Sagi-Kazar 2020-10-05 12:43:10 +02:00 committed by Nicola Murino
parent 6537c53d43
commit 17406d1aab

View file

@ -36,8 +36,6 @@ RUN mkdir -p /etc/sftpgo /var/lib/sftpgo/{backups,data,host_keys} /srv/sftpgo/we
RUN addgroup -g 1000 -S sftpgo
RUN adduser -u 1000 -h /srv/sftpgo -s /sbin/nologin -G sftpgo -S -D -H sftpgo
VOLUME /var/lib/sftpgo
# Override some configuration details
ENV SFTPGO_CONFIG_DIR=/etc/sftpgo
ENV SFTPGO_LOG_FILE_PATH=""
@ -58,4 +56,6 @@ RUN chown -R sftpgo:sftpgo /etc/sftpgo /var/lib/sftpgo /srv/sftpgo/web
USER sftpgo
VOLUME /var/lib/sftpgo
CMD sftpgo serve