From 35de8e84c68d8a9b82a03df4d6e403806497acca Mon Sep 17 00:00:00 2001 From: Gabriele De Rosa <4183824+derogab@users.noreply.github.com> Date: Fri, 26 Nov 2021 12:44:25 +0100 Subject: [PATCH] Add PIP extra index URLs --- Dockerfile | 7 +++++-- pip.conf | 5 +++++ 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 pip.conf diff --git a/Dockerfile b/Dockerfile index 721ad91..e9119ec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,11 +15,12 @@ RUN apk update --no-cache \ && ln -snf /usr/share/zoneinfo/Europe/Rome /etc/localtime \ # Remove tmp files && rm -rf /tmp/* /var/tmp/* \ - # Add PiWheels support - && echo "[global]\nextra-index-url=https://www.piwheels.org/simple" >> /etc/pip.conf \ # Upgrade PIP && python3 -m pip install --no-cache-dir --upgrade pip +# Copy PIP extra index URLs +COPY pip.conf + # Copy requirements COPY requirements.txt . @@ -27,6 +28,8 @@ COPY requirements.txt . RUN apk update --no-cache \ # Install tmp packages && apk add --no-cache --virtual build-deps gcc python3-dev musl-dev \ + # Add PIP extra index URLs + && mv pip.conf /etc/pip.conf \ # Install PIP packages && python3 -m pip install --no-cache-dir -r requirements.txt \ # Delete tmp packages diff --git a/pip.conf b/pip.conf new file mode 100644 index 0000000..1e65546 --- /dev/null +++ b/pip.conf @@ -0,0 +1,5 @@ +[global] +index-url = https://alpine-wheels.github.io/index +extra-index-url = https://pypi.python.org/simple + https://pypi.org/simple + https://www.piwheels.org/simple