2014-10-20 00:10:19 +02:00
|
|
|
# Radicale Dockerfile
|
|
|
|
#
|
2016-04-02 10:35:39 +02:00
|
|
|
# VERSION 0.3.1
|
2014-10-20 00:10:19 +02:00
|
|
|
|
2016-06-24 17:38:43 +02:00
|
|
|
FROM alpine:latest
|
2014-10-20 00:10:19 +02:00
|
|
|
|
2016-06-24 17:40:43 +02:00
|
|
|
MAINTAINER Radicale project "radicale@librelist.com"
|
|
|
|
|
2015-12-28 19:17:30 +01:00
|
|
|
# Base packages
|
2016-06-26 15:19:07 +02:00
|
|
|
RUN apk --update --update-cache upgrade \
|
2016-06-24 17:38:43 +02:00
|
|
|
&& apk add \
|
|
|
|
python3 \
|
|
|
|
python3-dev \
|
|
|
|
build-base \
|
|
|
|
libffi-dev \
|
|
|
|
ca-certificates
|
2016-04-02 10:35:39 +02:00
|
|
|
|
|
|
|
# Python installation
|
|
|
|
# pip
|
2016-06-24 17:38:43 +02:00
|
|
|
ADD https://bootstrap.pypa.io/get-pip.py /tmp/install/
|
|
|
|
RUN python3 /tmp/install/* && \
|
|
|
|
pip install passlib bcrypt setuptools
|
2014-10-20 00:10:19 +02:00
|
|
|
|
2015-12-28 19:17:30 +01:00
|
|
|
# Radicale installation
|
2016-06-24 17:38:43 +02:00
|
|
|
RUN mkdir -p /data/config
|
|
|
|
|
|
|
|
COPY . /data/radicale
|
|
|
|
COPY config /data/config
|
|
|
|
|
|
|
|
RUN cd /data/radicale && python3 setup.py install
|
2015-12-28 19:17:30 +01:00
|
|
|
|
|
|
|
# User
|
2016-06-24 17:38:43 +02:00
|
|
|
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
|
2016-03-28 10:51:36 +02:00
|
|
|
|
2016-06-24 17:38:43 +02:00
|
|
|
USER radicale
|
|
|
|
WORKDIR /home/radicale
|
2015-12-28 19:17:30 +01:00
|
|
|
|
2016-06-24 17:38:43 +02:00
|
|
|
CMD ["radicale", "-D", "-C", "/data/config/config"]
|