55 lines
1.3 KiB
Docker
55 lines
1.3 KiB
Docker
FROM alpine:3.14
|
|
|
|
ARG COMMIT_ID
|
|
ENV COMMIT_ID ${COMMIT_ID}
|
|
|
|
ARG VERSION
|
|
ENV VERSION ${VERSION:-3.1.8}
|
|
|
|
ARG BUILD_UID
|
|
ENV BUILD_UID ${BUILD_UID:-2999}
|
|
|
|
ARG BUILD_GID
|
|
ENV BUILD_GID ${BUILD_GID:-2999}
|
|
|
|
ARG TAKE_FILE_OWNERSHIP
|
|
ENV TAKE_FILE_OWNERSHIP ${TAKE_FILE_OWNERSHIP:-true}
|
|
|
|
LABEL maintainer="Mark <mark@betalupi.com>" \
|
|
org.label-schema.name="Radicale Docker Image" \
|
|
org.label-schema.description="Docker image for Radicale, the CalDAV/CardDAV server"
|
|
|
|
RUN apk add --no-cache --virtual=build-dependencies \
|
|
gcc \
|
|
musl-dev \
|
|
libffi-dev \
|
|
python3-dev \
|
|
&& apk add --no-cache \
|
|
curl \
|
|
git \
|
|
openssh \
|
|
shadow \
|
|
su-exec \
|
|
tzdata \
|
|
wget \
|
|
python3 \
|
|
py3-tz \
|
|
py3-pip \
|
|
&& python3 -m pip install --upgrade pip \
|
|
&& python3 -m pip install radicale==$VERSION passlib[bcrypt] \
|
|
&& apk del --purge build-dependencies \
|
|
&& addgroup -g $BUILD_GID radicale \
|
|
&& adduser -D -s /bin/false -H -u $BUILD_UID -G radicale radicale \
|
|
&& mkdir -p /config /data \
|
|
&& chmod -R 770 /data \
|
|
&& chown -R radicale:radicale /data \
|
|
&& rm -fr /root/.cache
|
|
|
|
HEALTHCHECK --interval=30s --retries=3 CMD curl --fail http://localhost:5232 || exit 1
|
|
VOLUME /config /data
|
|
EXPOSE 5232
|
|
|
|
COPY start.sh /usr/local/bin
|
|
ENTRYPOINT ["/usr/local/bin/start.sh"]
|
|
CMD ["radicale", "--config", "/config/config"]
|