Skip to content

Instantly share code, notes, and snippets.

@cdpb
Last active March 28, 2016 08:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cdpb/7ab1690f30fe6a911dac to your computer and use it in GitHub Desktop.
Save cdpb/7ab1690f30fe6a911dac to your computer and use it in GitHub Desktop.
OBSOLET Radicale Alpine dev
# Radicale Dockerfile
#
# VERSION 0.3
FROM alpine:latest
# Base packages
RUN apk update && apk upgrade
RUN apk add ca-certificates python nginx py-setuptools apache2-utils
# Webserver
COPY docker/nginx.conf /etc/nginx/
COPY docker/radicale.passwd /etc/nginx/
# Workaround to get non root access to nginx
RUN nginx
# Radicale installation
RUN mkdir -p /data/config
COPY . /data/radicale
COPY config /data/config
RUN cd /data/radicale && python2.7 setup.py install
# User
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/ /home/radicale/ /var/log/nginx/ /var/lib/nginx/ /var/run/nginx/ && \
chmod -R 0755 /var/log/nginx/ /var/lib/nginx/
#USER radicale
WORKDIR /home/radicale
CMD ["radicale", "-D", "-C", "/data/config/config"]
worker_processes 1;
worker_rlimit_nofile 1024;
error_log /dev/null;
events {
worker_connections 800;
}
http {
server {
listen 5232;
location / {
auth_basic "Restricted";
auth_basic_user_file radicale.passwd;
proxy_pass http://localhost:5233;
}
}
}
# test:test
test:$2y$05$jgW3E.Vq5utSWFqn68zqKOmU3/57ByjFaij/Zo4bdWNo1DiOyRsI6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment