forked from Kozea/Radicale
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
33 lines (24 loc) · 945 Bytes
/
Dockerfile.dev
File metadata and controls
33 lines (24 loc) · 945 Bytes
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
FROM python:3-slim-bullseye as builder
# Optional dependencies (e.g. bcrypt)
ARG DEPENDENCIES=bcrypt
COPY . /app
WORKDIR /app
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential python3-dev libldap2-dev libsasl2-dev slapd ldap-utils \
&& python -m venv /app/venv \
&& /app/venv/bin/pip install --no-cache-dir .[${DEPENDENCIES}]
FROM python:3-slim-bullseye
WORKDIR /app
RUN adduser radicale --home /var/lib/radicale --system --uid 1000 --disabled-password \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y ca-certificates openssl ldap-utils libldap-2.4-2 slapd \
&& rm -rf /var/lib/apt/lists/*
COPY --chown=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