當我建立我的碼頭工人形象時,得到這樣的警告:InsecurePlatformWarning建設碼頭工人形象
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:79:
InsecurePlatformWarning: A true SSLContext object is not available.
This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail.
For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
幾個來源(如InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately)說,pip install pyopenssl ndg-httpsclient pyasn1
將解決這個問題。但是,只要pip試圖安裝pyopenssl,我就會收到警告。
這裏是我的Dockerfile:
FROM ubuntu:14.04
# Install packages
RUN apt-get update && apt-get install -y \
git \
libmysqlclient-dev \
mysql-server \
nginx \
python-dev \
python-mysqldb \
python-setuptools \
supervisor \
vim
RUN easy_install pip
# Handle urllib3 InsecurePlatformWarning
RUN apt-get install -y libffi-dev libssl-dev
RUN pip install pyopenssl ndg-httpsclient pyasn1
# ...more
嘗試使用--upgrade標誌,例如:'RUN pip install --upgrade pyopenssl ndg-httpsclient pyasn1' – dopstar
沒有運氣(這是有道理的,因爲沒有存在ng包,以便在Docker映像生成時升級 - 除非我誤解'pip install --upgrade')。 –
嘗試在'RUN apt-get install -y libffi-dev libssl-dev'中添加'libpython2.7-dev'。 'pip安裝請求[安全性]'而不是'pip install pyopenssl'更好' – ahmed