From 1d745aed01ca52351f6e352a401413a59632335d Mon Sep 17 00:00:00 2001 From: root Date: Mon, 19 Apr 2021 12:21:26 +0200 Subject: [PATCH] Update to new pip version https://github.com/pypa/pip/issues/7309 --- carbon-cache/Dockerfile | 13 ++++++++----- graphite-web/Dockerfile | 13 ++++++++----- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/carbon-cache/Dockerfile b/carbon-cache/Dockerfile index 2b6535c..bfbc8cf 100644 --- a/carbon-cache/Dockerfile +++ b/carbon-cache/Dockerfile @@ -1,20 +1,23 @@ FROM alpine:latest AS build -ENV PYTHONPATH="/opt/graphite/lib/:/opt/graphite/webapp/" +#ENV PYTHONPATH="/opt/graphite/lib/:/opt/graphite/webapp/" RUN apk --no-cache add python3 libffi RUN apk --no-cache add python3-dev gcc libc-dev py3-pip libffi-dev -RUN pip3 install --no-binary=:all: --install-option="--prefix=/opt/graphite" --install-option="--install-lib=/opt/graphite/lib" https://github.com/graphite-project/whisper/tarball/master https://github.com/graphite-project/carbon/tarball/master https://github.com/graphite-project/graphite-web/tarball/master && \ - touch /opt/graphite/lib/zope/__init__.py +RUN pip3 install wheel urllib3 + +RUN pip3 install --no-binary=:all: --prefix=/opt/graphite https://github.com/graphite-project/whisper/tarball/master https://github.com/graphite-project/carbon/tarball/master https://github.com/graphite-project/graphite-web/tarball/master FROM alpine:latest -ENV PYTHONPATH="/opt/graphite/lib/:/opt/graphite/webapp/" +ENV PYTHONPATH="/opt/graphite/lib/:/opt/graphite/lib/python3.8/site-packages/:/opt/graphite/webapp/" -RUN apk --no-cache add python3 libffi +RUN apk --no-cache add python3 py3-pip libffi + +RUN pip3 install urllib3 RUN mkdir -p /etc/carbon /var/lib/graphite/whisper diff --git a/graphite-web/Dockerfile b/graphite-web/Dockerfile index 83d4f43..69fced2 100644 --- a/graphite-web/Dockerfile +++ b/graphite-web/Dockerfile @@ -1,21 +1,24 @@ FROM alpine:latest AS build -ENV PYTHONPATH="/opt/graphite/lib/:/opt/graphite/webapp/" +#ENV PYTHONPATH="/opt/graphite/lib/:/opt/graphite/webapp/" RUN apk --no-cache add python3 libffi py3-gunicorn cairo py3-setuptools RUN apk --no-cache add python3-dev gcc libc-dev py3-pip libffi-dev py3-gunicorn cairo py3-mysqlclient +RUN pip3 install wheel urllib3 + # the touch fixes the missing __init__.py file from the broken zope.interface package ... -RUN pip3 install --no-binary=:all: --install-option="--prefix=/opt/graphite" --install-option="--install-lib=/opt/graphite/lib" https://github.com/graphite-project/whisper/archive/1.1.6.zip https://github.com/graphite-project/carbon/archive/1.1.6.zip https://github.com/graphite-project/graphite-web/archive/1.1.6.zip "whitenoise==3.*" && \ - touch /opt/graphite/lib/zope/__init__.py +RUN pip3 install --no-binary=:all: --prefix=/opt/graphite https://github.com/graphite-project/whisper/archive/1.1.6.zip https://github.com/graphite-project/carbon/archive/1.1.6.zip https://github.com/graphite-project/graphite-web/archive/1.1.6.zip "whitenoise==3.*" FROM alpine:latest -ENV PYTHONPATH="/opt/graphite/lib/:/opt/graphite/webapp/" +ENV PYTHONPATH="/opt/graphite/lib/:/opt/graphite/lib/python3.8/site-packages/:/opt/graphite/webapp/" + +RUN apk --no-cache add python3 libffi py3-gunicorn cairo py3-setuptools py3-mysqlclient py3-pip -RUN apk --no-cache add python3 libffi py3-gunicorn cairo py3-setuptools py3-mysqlclient +RUN pip3 install urllib3 RUN mkdir -p /var/lib/graphite/whisper /etc/uwsgi /opt/graphite/webapp/graphite