فهرست منبع

Docker: Use extras for dependencies

Explicit installation of passlib and bcrypt is still included for older versions.
Unrud 7 سال پیش
والد
کامیت
e6e3db6e05
1فایلهای تغییر یافته به همراه9 افزوده شده و 7 حذف شده
  1. 9 7
      Dockerfile

+ 9 - 7
Dockerfile

@@ -10,17 +10,19 @@ RUN apk add --no-cache \
       build-base \
       libffi-dev \
       ca-certificates \
-      openssl && \
-    python3 -m pip install passlib bcrypt && \
-    apk del \
-      python3-dev \
-      build-base \
-      libffi-dev
+      openssl
 # Install Radicale
 RUN wget --quiet https://github.com/Kozea/Radicale/archive/${VERSION}.tar.gz --output-document=radicale.tar.gz && \
     tar xzf radicale.tar.gz && \
-    python3 -m pip install ./Radicale-${VERSION} && \
+    pip3 install ./Radicale-${VERSION}[md5,bcrypt] && \
     rm -r radicale.tar.gz Radicale-${VERSION}
+# Install dependencies for Radicale<2.1.9
+RUN pip3 install passlib[bcrypt]
+# Remove build dependencies
+RUN apk del \
+      python3-dev \
+      build-base \
+      libffi-dev
 # Persistent storage for data (Mount it somewhere on the host!)
 VOLUME /var/lib/radicale
 # Configuration data (Put the "config" file here!)