Dockerfile 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. FROM alpine:latest
  2. # Version of Radicale (e.g. 2.0.0)
  3. ARG VERSION=master
  4. # Install dependencies
  5. RUN apk add --no-cache \
  6. python3 \
  7. python3-dev \
  8. build-base \
  9. libffi-dev \
  10. ca-certificates \
  11. openssl
  12. # update pip
  13. RUN pip3 install --upgrade pip
  14. # Install Radicale
  15. RUN wget --quiet https://github.com/Kozea/Radicale/archive/${VERSION}.tar.gz --output-document=radicale.tar.gz && \
  16. tar xzf radicale.tar.gz && \
  17. pip3 install ./Radicale-${VERSION}[md5,bcrypt] && \
  18. rm -r radicale.tar.gz Radicale-${VERSION}
  19. # Install dependencies for Radicale<2.1.9
  20. RUN pip3 install passlib[bcrypt]
  21. # Remove build dependencies
  22. RUN apk del \
  23. python3-dev \
  24. build-base \
  25. libffi-dev
  26. # Persistent storage for data (Mount it somewhere on the host!)
  27. VOLUME /var/lib/radicale
  28. # Configuration data (Put the "config" file here!)
  29. VOLUME /etc/radicale
  30. # TCP port of Radicale (Publish it on a host interface!)
  31. EXPOSE 5232
  32. # Run Radicale (Configure it here or provide a "config" file!)
  33. CMD ["radicale", "--hosts", "0.0.0.0:5232"]