构建Docker镜像时的InsecurePlatformWarning

时间:2015-09-26 00:42:39

标签: python ubuntu docker pip urllib3

构建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

0 个答案:

没有答案