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