From b2ebb8a433662da51bfff8b4ae3b61a62a85fee7 Mon Sep 17 00:00:00 2001 From: Alexis 'Horgix' Chotard Date: Fri, 24 Jun 2016 17:38:43 +0200 Subject: [PATCH] Dockerfile: change style according to official Dockerfiles --- Dockerfile | 45 ++++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/Dockerfile b/Dockerfile index 43af745..b9ceee1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,33 +2,40 @@ # # VERSION 0.3.1 -FROM alpine:latest +FROM alpine:latest # Base packages -RUN apk update && \ - apk upgrade && \ - apk add python3 python3-dev build-base libffi-dev ca-certificates +RUN apk update \ + && apk upgrade \ + && apk add \ + python3 \ + python3-dev \ + build-base \ + libffi-dev \ + ca-certificates # Python installation # pip -ADD https://bootstrap.pypa.io/get-pip.py /tmp/install/ -RUN python3 /tmp/install/* && \ - pip install passlib bcrypt setuptools +ADD https://bootstrap.pypa.io/get-pip.py /tmp/install/ +RUN python3 /tmp/install/* && \ + pip install passlib bcrypt setuptools # Radicale installation -RUN mkdir -p /data/config -COPY . /data/radicale -COPY config /data/config -RUN cd /data/radicale && python3 setup.py install +RUN mkdir -p /data/config + +COPY . /data/radicale +COPY config /data/config + +RUN cd /data/radicale && python3 setup.py install # 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 +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 +USER radicale +WORKDIR /home/radicale -CMD ["radicale", "-D", "-C", "/data/config/config"] +CMD ["radicale", "-D", "-C", "/data/config/config"]