-
Notifications
You must be signed in to change notification settings - Fork 211
/
Dockerfile
51 lines (44 loc) · 1.02 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
FROM node as builder
COPY . /app
WORKDIR /app
RUN yarn && yarn radicale
FROM alpine
RUN apk add --no-cache \
radicale \
&& rm -rf /var/cache/apk/* \
\
&& { \
echo '[root]'; \
echo 'user: .+'; \
echo 'collection:'; \
echo 'permissions: R'; \
echo; \
echo '[principal]'; \
echo 'user: .+'; \
echo 'collection: {user}'; \
echo 'permissions: R'; \
echo; \
echo '[collections]'; \
echo 'user: .+'; \
echo 'collection: {user}/[^/]+'; \
echo 'permissions: rR'; \
} > /etc/radicale/rights \
\
&& { \
echo '[server]'; \
echo 'hosts = 0.0.0.0:5232, [::]:5232'; \
echo; \
echo '[web]'; \
echo 'type = none'; \
echo; \
echo '[storage]'; \
echo 'type = multifilesystem'; \
echo 'filesystem_folder = /app/vcards'; \
echo; \
echo '[rights]'; \
echo 'type = from_file'; \
echo 'file = /etc/radicale/rights'; \
} > /etc/radicale/config
COPY --from=builder /app/radicale/ /app/vcards/collection-root/cn/
EXPOSE 5232
CMD ["radicale"]