Собираю контейнер при помощи Dockerfile через docker-compose.
В docker-compose.yml что-то вроде:
...
web:
build: .
...
В качестве базового образа используется
python:3
Фрагмент Dockerfile:
FROM python:3
ADD requirements.txt /app/my_app/requirements.txt
...
pip install -r requirements.txt -i https://pypi.python.org/simple/
Процесс падает на этой ошибке
Collecting filelike==0.4.1 (from -r /app/my_app/requirements.txt (line 12))
Downloading filelike-0.4.1.tar.gz
Complete output from command python setup.py egg_info:
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.10.tar.gz
Traceback (most recent call last):
File "/tmp/pip-build-lcylheiv/filelike/distribute_setup.py", line 143, in use_setuptools
raise ImportError
ImportError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-lcylheiv/filelike/setup.py", line 4, in <module>
distribute_setup.use_setuptools()
File "/tmp/pip-build-lcylheiv/filelike/distribute_setup.py", line 145, in use_setuptools
return _do_download(version, download_base, to_dir, download_delay)
File "/tmp/pip-build-lcylheiv/filelike/distribute_setup.py", line 124, in _do_download
to_dir, download_delay)
File "/tmp/pip-build-lcylheiv/filelike/distribute_setup.py", line 193, in download_setuptools
src = urlopen(url)
File "/usr/local/lib/python3.6/urllib/request.py", line 223, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/lib/python3.6/urllib/request.py", line 532, in open
response = meth(req, response)
File "/usr/local/lib/python3.6/urllib/request.py", line 642, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/local/lib/python3.6/urllib/request.py", line 570, in error
return self._call_chain(*args)
File "/usr/local/lib/python3.6/urllib/request.py", line 504, in _call_chain
result = func(*args)
File "/usr/local/lib/python3.6/urllib/request.py", line 650, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: SSL is required
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-lcylheiv/filelike/
ERROR: Service 'web' failed to build: The command '/bin/sh -c pip install -r /app/my_app/requirements.txt -i https://pypi.python.org/simple/' returned a non-zero code: 1
Что необходимо исправить на этом шаге сборки образа?