Я подозреваю, что проблема в том, что брандмауэр блокирует запрос поскольку если я попытаюсь просто запустить pip install [package], я получаю кучу ошибок о том, что сертификаты SSL не являются доверенными, что исправляется добавлением pypi.org и двух других адресов в список доверенных хосты в pip.conf. Однако, похоже, это не работает при обновлении самого пункта:
Код: Выделить всё
FROM python:3.9-alpine
RUN python -m pip --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org -vvv install --upgrade pip
Код: Выделить всё
#7 2.754 Using pip 23.0.1 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)
#7 2.757 Non-user install because site-packages writeable
#7 2.873 Created temporary directory: /tmp/pip-build-tracker-tphy2goz
#7 2.874 Initialized build tracking at /tmp/pip-build-tracker-tphy2goz
#7 2.874 Created build tracker: /tmp/pip-build-tracker-tphy2goz
#7 2.912 Getting page https://pypi.org/simple/pip/
#7 2.913 Found index url https://pypi.org/simple
#7 3.015 https://pypi.org:443 "GET /simple/pip/ HTTP/1.1" 403 2896
#7 2.910 Requirement already satisfied: pip in /usr/local/lib/python3.9/site-packages (23.0.1)
#7 2.911 1 location(s) to search for versions of pip:
#7 2.912 Fetching project page and analyzing links: https://pypi.org/simple/pip/
#7 2.874 Entered build tracker: /tmp/pip-build-tracker-tphy2goz
#7 2.874 Created temporary directory: /tmp/pip-install-yvotwem9
#7 2.911 * https://pypi.org/simple/pip/
#7 2.917 Starting new HTTPS connection (1): pypi.org:443
#7 2.876 Created temporary directory: /tmp/pip-ephem-wheel-cache-z30y8_kb
#7 3.016 Could not fetch URL https://pypi.org/simple/pip/: 403 Client Error: Forbidden for url: https://pypi.org/simple/pip/ - skipping
#7 3.016 Skipping link: not a file: https://pypi.org/simple/pip/
#7 3.129 https://pypi.org:443 "GET /simple/pip/ HTTP/1.1" 403 2896
#7 3.023 Created temporary directory: /tmp/pip-unpack-hm_cec0g
#7 3.071 1 location(s) to search for versions of pip:
#7 3.071 * https://pypi.org/simple/pip/
#7 3.071 Fetching project page and analyzing links: https://pypi.org/simple/pip/
#7 3.071 Getting page https://pypi.org/simple/pip/
#7 3.072 Found index url https://pypi.org/simple
#7 3.073 Starting new HTTPS connection (1): pypi.org:443
#7 3.021 Given no hashes to check 0 links for project 'pip': discarding no candidates
#7 3.130 Could not fetch URL https://pypi.org/simple/pip/: 403 Client Error: Forbidden for url: https://pypi.org/simple/pip/ - skipping
#7 3.131 Given no hashes to check 0 links for project 'pip': discarding no candidates
#7 3.131 Skipping link: not a file: https://pypi.org/simple/pip/
#7 3.132 No remote pip version found
#7 3.133 Removed build tracker: '/tmp/pip-build-tracker-tphy2goz'
#7 DONE 3.4s
Есть ли другой способ доверять адресу или как-то обойти эту проблему?
Подробнее здесь: https://stackoverflow.com/questions/789 ... e-firewall