构建Docker镜像时出现此警告:
/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