radicale/Dockerfile

31 lines
737 B
Docker
Raw Normal View History

2014-10-20 00:10:19 +02:00
# Radicale Dockerfile
#
2016-03-28 10:51:36 +02:00
# VERSION 0.3
2014-10-20 00:10:19 +02:00
2016-03-28 10:51:36 +02:00
FROM alpine:latest
2014-10-20 00:10:19 +02:00
2015-12-28 19:17:30 +01:00
# Base packages
2016-03-28 10:51:36 +02:00
RUN apk update && \
apk upgrade && \
apk add ca-certificates git python python-dev py-setuptools py-pip build-base libffi-dev
2014-10-20 00:10:19 +02:00
2015-12-28 19:17:30 +01:00
# Radicale installation
RUN pip install passlib bcrypt
2016-03-28 10:51:36 +02:00
RUN mkdir -p /data/config && \
2015-12-28 19:17:30 +01:00
cd /data
COPY . /data/radicale
COPY config /data/config
RUN cd /data/radicale && python2.7 setup.py install
# User
2016-03-28 10:51:36 +02:00
RUN adduser -h /home/radicale -D radicale && \
2015-12-28 19:17:30 +01:00
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
2015-12-28 19:17:30 +01:00
USER radicale
WORKDIR /home/radicale
CMD ["radicale", "-D", "-C", "/data/config/config"]