Add argument for specifying optional dependencies

This commit is contained in:
Eugene Davis
2022-09-26 12:25:56 +02:00
committed by Julien Sanchez
parent 5b0830ea08
commit 2dd7328859
2 changed files with 7 additions and 2 deletions

View File

@@ -5,9 +5,12 @@ FROM python:3-alpine as builder
# Version of Radicale (e.g. v3)
ARG VERSION=master
# Optional dependencies (e.g. bcrypt)
ARG DEPENDENCIES=bcrypt
RUN apk add --no-cache --virtual gcc libffi-dev musl-dev \
&& python -m venv /app/venv \
&& /app/venv/bin/pip install --no-cache-dir "Radicale[bcrypt] @ https://github.com/Kozea/Radicale/archive/${VERSION}.tar.gz"
&& /app/venv/bin/pip install --no-cache-dir "Radicale[${DEPENDENCIES}] @ https://github.com/Kozea/Radicale/archive/${VERSION}.tar.gz"
FROM python:3-alpine