[ADD]Radicale Dockerfile from C7 (alternative)

This commit is contained in:
Fabien BOURGEOIS 2018-05-03 16:42:54 +02:00
parent 1eae37b7bd
commit 0c65a69b3f
2 changed files with 33 additions and 0 deletions

31
radicale/Dockerfile.c7 Normal file
View File

@ -0,0 +1,31 @@
FROM centos:7
MAINTAINER Yaltik - Fabien Bourgeois <fabien@yaltik.com>
# http://bugs.python.org/issue19846
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
ENV LANG C.UTF-8
ENV VERSION 2.1.9
# Install dependencies
RUN yum install -y centos-release-scl
RUN yum-config-manager --enable rhel-server-rhscl-7-rpms
RUN yum install -y rh-python35
# Create radicale user
RUN useradd radicale -md /opt/radicale
WORKDIR /opt/radicale
USER radicale
# Install Radicale
RUN scl enable rh-python35 "pip install --user radicale==${VERSION}"
COPY config .config/radicale/config/
RUN mkdir /opt/radicale/storage
# Persistent storage for data and configuration
VOLUME /opt/radicale/storage
# TCP port of Radicale
EXPOSE 5232
# Run Radicale
CMD scl enable rh-python35 ".local/bin/radicale --hosts 0.0.0.0:5232"

View File

@ -0,0 +1,2 @@
#!/bin/bash
source scl_source enable rh-python35