From 3981a781b922bbabdc089104d0e6f11a5b9a9701 Mon Sep 17 00:00:00 2001 From: Tweeticoats <60335703+Tweeticoats@users.noreply.github.com> Date: Tue, 25 May 2021 10:18:06 +0930 Subject: [PATCH] This adds extra libraries required by scrapers: requests-toolbelt lxml cloudscraper (#1381) This installs pip in the prep environment, uses this to install cloudscraper then copies this to the final application container. --- docker/ci/x86_64/Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docker/ci/x86_64/Dockerfile b/docker/ci/x86_64/Dockerfile index 1db050163..3c6e79497 100644 --- a/docker/ci/x86_64/Dockerfile +++ b/docker/ci/x86_64/Dockerfile @@ -8,9 +8,12 @@ RUN if [ "$TARGETPLATFORM" = "linux/arm/v6" ]; then BIN=stash-pi; \ elif [ "$TARGETPLATFORM" = "linux/amd64" ]; then BIN=stash-linux; \ fi; \ mv $BIN /stash +ENV DEBIAN_FRONTEND=noninteractive +RUN apt update && apt install -y python3 python-is-python3 python3-requests python3-requests-toolbelt python3-lxml python3-pip && pip3 install cloudscraper FROM ubuntu:20.04 as app -run apt update && apt install -y python3 python3 python-is-python3 python3-requests ffmpeg && rm -rf /var/lib/apt/lists/* +run apt update && apt install -y python3 python-is-python3 python3-requests python3-requests-toolbelt python3-lxml ffmpeg && rm -rf /var/lib/apt/lists/* COPY --from=prep /stash /usr/bin/ +COPY --from=prep /usr/local/lib/python3.8/dist-packages /usr/local/lib/python3.8/dist-packages ENV STASH_CONFIG_FILE=/root/.stash/config.yml