Dockerfile 822 B

12345678910111213141516171819202122232425262728293031323334
  1. # Radicale Dockerfile
  2. #
  3. # VERSION 0.3.1
  4. FROM alpine:latest
  5. # Base packages
  6. RUN apk update && \
  7. apk upgrade && \
  8. apk add python3 python3-dev build-base libffi-dev ca-certificates
  9. # Python installation
  10. # pip
  11. ADD https://bootstrap.pypa.io/get-pip.py /tmp/install/
  12. RUN python3 /tmp/install/* && \
  13. pip install passlib bcrypt setuptools
  14. # Radicale installation
  15. RUN mkdir -p /data/config
  16. COPY . /data/radicale
  17. COPY config /data/config
  18. RUN cd /data/radicale && python3 setup.py install
  19. # User
  20. RUN adduser -h /home/radicale -D radicale && \
  21. mkdir -p /home/radicale/.config && \
  22. ln -s /data/config /home/radicale/.config/radicale && \
  23. chown -R radicale:radicale /data/config && \
  24. chown -R radicale:radicale /home/radicale
  25. USER radicale
  26. WORKDIR /home/radicale
  27. CMD ["radicale", "-D", "-C", "/data/config/config"]