-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.3.5
More file actions
60 lines (47 loc) · 1.96 KB
/
Dockerfile.3.5
File metadata and controls
60 lines (47 loc) · 1.96 KB
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
FROM ghcr.io/neomediatech/ubuntu-base:24.04
ENV SERVICE=radicale \
RADICALE_CONFIG=/radicale.conf
LABEL org.opencontainers.image.source=https://github.com/Neomediatech/${SERVICE}
ARG BIN_SOURCE=https://github.com/Neomediatech/assets/raw/refs/heads/main/bin
ADD --chmod=777 ${BIN_SOURCE}/jq \
${BIN_SOURCE}/unzip \
/usr/local/bin/
RUN set -ex; \
apt-get update; \
apt-get install -y --no-install-recommends \
pipx && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN set -ex; \
user_info="$(getent passwd 1000)" || echo "";\
if [ "$user_info" != "" ]; then \
username="$(echo "$user_info" | cut -d: -f1)";\
if [ "$username" != "" ]; then \
userdel -r "$username"; \
fi;\
fi;\
groupadd -g 1000 radicale && \
useradd -m -d /var/lib/radicale --system --uid 1000 -g radicale radicale && \
touch /version && chmod 666 /version && \
mkdir -p /app && chown radicale:radicale /app && \
ln -s /app/bin/radicale /usr/local/bin/radicale
RUN VER="$(curl -s -H "Accept: application/vnd.github+json" "https://api.github.com/repos/Kozea/Radicale/releases/latest" | \
jq -r '.tag_name' | \
sed 's/v//')" && \
export PIPX_HOME=/app && \
export PIPX_BIN_DIR=/app/bin && \
pipx install radicale~=${VER} && \
pipx ensurepath && \
radicale --version >> /version
USER root
RUN wget -P /tmp/ https://inf-it.com/open-source/download/InfCloud_0.13.1.zip && \
unzip -d /app/venvs/radicale/lib/*/site-packages/radicale/web/internal_data/ /tmp/InfCloud_0.13.1.zip && \
rm -f /tmp/InfCloud_0.13.1.zip
COPY radicale.3.5.conf /radicale.conf
COPY --chmod=755 entrypoint.3.5.sh /entrypoint.sh
USER radicale
EXPOSE 5232/tcp
VOLUME ["/data"]
HEALTHCHECK --interval=60s --timeout=30s --start-period=10s --retries=5 CMD curl -I -s -L http://localhost:5232/.web/ || exit 1
ENTRYPOINT ["/tini","--","/entrypoint.sh"]
CMD ["radicale","-S"]