老师,你好,我使用dockerfile生成镜像,安装flask和redis失败,报错如下
[vagrant@bogon flask-docke]$ sudo docker build -t xinsir8/flask-redis .
Sending build context to Docker daemon 3.072kB
Step 1/7 : FROM python:2.7
—> 4ee4ea2f0113
Step 2/7 : LABEL maintaner=“Peng Xiao xiaoquwl@gmail.com”
—> Using cache
—> 31f4bdd97ec9
Step 3/7 : COPY . /app
—> Using cache
—> 1c6a6e943618
Step 4/7 : WORKDIR /app
—> Using cache
—> 41561c8c394e
Step 5/7 : RUN pip install flask redis
—> Running in 605ced9befb6
Collecting flask
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(SSLError(1, u’[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)’),)’: /simple/flask/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(SSLError(1, u’[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)’),)’: /simple/flask/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(SSLError(1, u’[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)’),)’: /simple/flask/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(SSLError(1, u’[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)’),)’: /simple/flask/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(SSLError(1, u’[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)’),)’: /simple/flask/
Could not fetch URL https://pypi.org/simple/flask/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host=‘pypi.org’, port=443): Max retries exceeded with url: /simple/flask/ (Caused by SSLError(SSLError(1, u’[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)’),)) - skipping
Could not find a version that satisfies the requirement flask (from versions: )
No matching distribution found for flask
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host=‘pypi.org’, port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLError(1, u’[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)’),)) - skipping
The command ‘/bin/sh -c pip install flask redis’ returned a non-zero code: 1
[vagrant@bogon flask-docke]$