mirror of
https://github.com/Kozea/Radicale.git
synced 2025-06-26 16:45:52 +00:00
Add argument for specifying optional dependencies
This commit is contained in:
parent
5b0830ea08
commit
2dd7328859
2 changed files with 7 additions and 2 deletions
|
@ -5,9 +5,12 @@ FROM python:3-alpine as builder
|
||||||
# Version of Radicale (e.g. v3)
|
# Version of Radicale (e.g. v3)
|
||||||
ARG VERSION=master
|
ARG VERSION=master
|
||||||
|
|
||||||
|
# Optional dependencies (e.g. bcrypt)
|
||||||
|
ARG DEPENDENCIES=bcrypt
|
||||||
|
|
||||||
RUN apk add --no-cache --virtual gcc libffi-dev musl-dev \
|
RUN apk add --no-cache --virtual gcc libffi-dev musl-dev \
|
||||||
&& python -m venv /app/venv \
|
&& 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
|
FROM python:3-alpine
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
FROM python:3-alpine as builder
|
FROM python:3-alpine as builder
|
||||||
|
|
||||||
|
# Optional dependencies (e.g. bcrypt)
|
||||||
|
ARG DEPENDENCIES=bcrypt
|
||||||
|
|
||||||
COPY . /app
|
COPY . /app
|
||||||
|
|
||||||
|
@ -7,7 +9,7 @@ WORKDIR /app
|
||||||
|
|
||||||
RUN apk add --no-cache --virtual gcc libffi-dev musl-dev \
|
RUN apk add --no-cache --virtual gcc libffi-dev musl-dev \
|
||||||
&& python -m venv /app/venv \
|
&& 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
|
FROM python:3-alpine
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue