diff --git a/Dockerfile b/Dockerfile index 67c5fc1b..1af0d855 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/Dockerfile.dev b/Dockerfile.dev index 879c5e39..f2644997 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -1,5 +1,7 @@ FROM python:3-alpine as builder +# Optional dependencies (e.g. bcrypt) +ARG DEPENDENCIES=bcrypt COPY . /app @@ -7,7 +9,7 @@ WORKDIR /app RUN apk add --no-cache --virtual gcc libffi-dev musl-dev \ && python -m venv /app/venv \ - && /app/venv/bin/pip install --no-cache-dir .[bcrypt] + && /app/venv/bin/pip install --no-cache-dir .[${DEPENDENCIES}] FROM python:3-alpine