Merge pull request #368 from cdpb/master

move base image to alpine
This commit is contained in:
Guillaume Ayoub 2016-03-31 19:22:13 +02:00
commit 63f8b36df3

View File

@ -1,31 +1,29 @@
# Radicale Dockerfile
#
# VERSION 0.2
# VERSION 0.3
FROM debian:latest
ENV DEBIAN_FRONTEND noninteractive
FROM alpine:latest
# 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
RUN apk update && \
apk upgrade && \
apk add ca-certificates git python python-dev py-setuptools py-pip build-base libffi-dev
# Radicale installation
RUN pip install passlib bcrypt
RUN mkdir -p /data/config && \
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 && \
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
USER radicale
WORKDIR /home/radicale