tôi nhận được cảnh báo này khi xây dựng hình ảnh Docker tôi:InsecurePlatformWarning khi xây dựng hình ảnh 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.
Một số nguồn (như InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately) nói rằng pip install pyopenssl ndg-httpsclient pyasn1
sẽ khắc phục vấn đề này. Nhưng tôi nhận được cảnh báo ngay sau khi pip attemps để cài đặt pyopenssl.
Dưới đây là Dockerfile tôi:
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
thử sử dụng cờ --upgrade như: 'RUN pip install --upgrade pyopenssl ndg-httpsclient pyasn1' – dopstar
Không may mắn (điều này có ý nghĩa, vì không có existi ng gói cho pip để nâng cấp khi hình ảnh Docker được xây dựng - trừ khi tôi hiểu lầm 'pip install --upgrade'). –
thử thêm 'libpython2.7-dev' vào trong' RUN apt-get install -y libffi-dev libssl-dev'. cũng tốt hơn là 'pip install requests [security]' thay vì 'pip install pyopenssl' – ahmed