| 1234567891011121314151617181920212223242526272829303132 |
- FROM python:3-alpine as builder
- # Optional dependencies (e.g. bcrypt)
- ARG DEPENDENCIES=bcrypt
- COPY . /app
- WORKDIR /app
- RUN apk add --no-cache --virtual gcc libffi-dev musl-dev \
- && python -m venv /app/venv \
- && /app/venv/bin/pip install --no-cache-dir .[${DEPENDENCIES}]
- FROM python:3-alpine
- WORKDIR /app
- RUN addgroup -g 1000 radicale \
- && adduser radicale --home /var/lib/radicale --system --uid 1000 --disabled-password -G radicale \
- && apk add --no-cache ca-certificates openssl
- COPY --chown=radicale:radicale --from=builder /app/venv /app
- # Persistent storage for data
- VOLUME /var/lib/radicale
- # TCP port of Radicale
- EXPOSE 5232
- # Run Radicale
- ENTRYPOINT [ "/app/bin/python", "/app/bin/radicale"]
- CMD ["--hosts", "0.0.0.0:5232"]
- USER radicale
|