add improved docker version
This commit is contained in:
parent
20960bee84
commit
365e35cdba
32
Dockerfile
32
Dockerfile
@ -1,12 +1,32 @@
|
||||
# Radicale Dockerfile
|
||||
#
|
||||
# VERSION 0.1
|
||||
# VERSION 0.2
|
||||
|
||||
FROM debian
|
||||
FROM debian:latest
|
||||
|
||||
COPY . /opt/radicale
|
||||
WORKDIR /opt/radicale
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
CMD python -u radicale.py
|
||||
# Base packages
|
||||
RUN apt-get update -qq && apt-get upgrade -y -qq
|
||||
RUN apt-get install -y --no-install-recommends git ca-certificates python2.7 python-setuptools python-pip \
|
||||
build-essential libffi-dev python-dev
|
||||
|
||||
EXPOSE 5232
|
||||
# Radicale installation
|
||||
RUN pip install passlib bcrypt
|
||||
RUN mkdir -p /data/config && \
|
||||
cd /data
|
||||
COPY . /data/radicale
|
||||
COPY config /data/config
|
||||
RUN cd /data/radicale && python2.7 setup.py install
|
||||
|
||||
# User
|
||||
RUN useradd -d /home/radicale -m 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
|
||||
|
||||
CMD ["radicale", "-D", "-C", "/data/config/config"]
|
||||
|
Loading…
Reference in New Issue
Block a user