-
Notifications
You must be signed in to change notification settings - Fork 87
/
Dockerfile
60 lines (50 loc) · 1.72 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
FROM alpine:3.20.3
ARG COMMIT_ID
ENV COMMIT_ID=${COMMIT_ID}
ARG VERSION
ENV VERSION=${VERSION:-3.3.2}
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="Thomas Queste <[email protected]>" \
org.label-schema.name="Radicale Docker Image" \
org.label-schema.description="Enhanced Docker image for Radicale, the CalDAV/CardDAV server" \
org.label-schema.url="https://github.com/Kozea/Radicale" \
org.label-schema.version=$VERSION \
org.label-schema.vcs-ref=$COMMIT_ID \
org.label-schema.vcs-url="https://github.com/tomsquest/docker-radicale" \
org.label-schema.schema-version="1.0"
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-pip \
&& python -m venv /venv \
&& /venv/bin/pip install --no-cache-dir radicale==$VERSION passlib[bcrypt] pytz ldap3 \
&& 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
COPY config /config/config
HEALTHCHECK --interval=30s --retries=3 CMD curl --fail http://localhost:5232 || exit 1
VOLUME /config /data
EXPOSE 5232
COPY docker-entrypoint.sh /usr/local/bin
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["/venv/bin/radicale", "--config", "/config/config"]