From 906aaab8cdcb82f22da397baeb9b6087b14e461a Mon Sep 17 00:00:00 2001 From: Alexis 'Horgix' Chotard Date: Sun, 26 Jun 2016 17:25:40 +0200 Subject: [PATCH] Dockerfile: rework config handling - No need to run as another user, containers use user namespaces - Make config file path FHS compliant --- Dockerfile | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index a922c0b..2b18888 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,21 +17,10 @@ RUN apk --update --update-cache upgrade \ RUN pip3 install passlib bcrypt -RUN mkdir -p /data/config RUN wget ${TARBALL} \ && tar xzf ${VERSION}.tar.gz \ && cd Radicale-${VERSION} && python3 setup.py install -COPY config /data/config +COPY config /srv/radicale.conf -# User -RUN adduser -h /home/radicale -D radicale \ - && mkdir -p /home/radicale/.config \ - && ln -s /data/config /home/radicale/.config/radicale \ - && chown -R radicale:radicale /data/config \ - && chown -R radicale:radicale /home/radicale - -USER radicale -WORKDIR /home/radicale - -CMD ["radicale", "-D", "-C", "/data/config/config"] +CMD ["radicale", "-D", "-C", "/srv/radicale.conf"]