生成dockerfile镜像的时候,获取supervisor报错以下信息:
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('_vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x2e9fe10>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/supervisor/
经过检查,发现centos7的桌面版系统,没有安装pip。安装pip即可
使用以下命令安装pip
# yum -y install epel-release
Loaded plugins: fastestmirror, langpacks
base | 3.6 kB 00:00
extras | 3.4 kB 00:00
updates | 3.4 kB 00:00
updates/7/x86_64/primary_db | 6.0 MB 00:22
Loading mirror speeds from cached hostfile
* base: mirrors.163.com
* extras: centos.ustc.edu.cn
* updates: centos.ustc.edu.cn
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-9 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
epel-release noarch 7-9 extras 14 k
Transaction Summary
================================================================================
Install 1 Package
Total download size: 14 k
Installed size: 24 k
Downloading packages:
epel-release-7-9.noarch.rpm | 14 kB 00:02
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : epel-release-7-9.noarch 1/1
Verifying : epel-release-7-9.noarch 1/1
Installed:
epel-release.noarch 0:7-9
Complete!
[root@localhost centos7]# yum install python-pip
Loaded plugins: fastestmirror, langpacks
epel/x86_64/metalink | 7.2 kB 00:00
epel | 4.7 kB 00:00
(1/3): epel/x86_64/group_gz | 266 kB 00:02
(2/3): epel/x86_64/updateinfo | 879 kB 00:07
(3/3): epel/x86_64/primary_db | 6.2 MB 00:27
Loading mirror speeds from cached hostfile
* base: mirrors.163.com
* epel: mirror.ehost.vn
* extras: centos.ustc.edu.cn
* updates: centos.ustc.edu.cn
Resolving Dependencies
--> Running transaction check
---> Package python2-pip.noarch 0:8.1.2-5.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
python2-pip noarch 8.1.2-5.el7 epel 1.7 M
Transaction Summary
================================================================================
Install 1 Package
Total download size: 1.7 M
Installed size: 7.2 M
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/x86_64/7/epel/packages/python2-pip-8.1.2-5.el7.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Public key for python2-pip-8.1.2-5.el7.noarch.rpm is not installed
python2-pip-8.1.2-5.el7.noarch.rpm | 1.7 MB 00:25
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Importing GPG key 0x352C64E5:
Userid : "Fedora EPEL (7) @fedoraproject .org>"
Fingerprint: 91e9 7d7c 4a5e 96f1 7f3e 888f 6a2f aea2 352c 64e5
Package : epel-release-7-9.noarch (@extras)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : python2-pip-8.1.2-5.el7.noarch 1/1
Verifying : python2-pip-8.1.2-5.el7.noarch 1/1
Installed:
python2-pip.noarch 0:8.1.2-5.el7
Complete!
对安装好的pip进行升级 8.2——>9.0.1
# pip install --upgrade pip
/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
SNIMissingWarning
/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Collecting pip
Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB)
19% |?..?..?..?. | 245kB 82kB/s eta 0:00:1
20% |?..?..?..?. | 256kB 82kB/s eta 0:00:1
21% |?..?..?..?. | 266kB 87kB/s eta 0:00:1
22% |?..?..?..?. | 276kB 87kB/s eta 0:00:1
22% |?..?..?..?.. | 286kB 69kB/s eta 0:00
23% |?..?..?..?.. | 296kB 62kB/s eta 0:00
24% |?..?..?..?.. | 307kB 70kB/s eta 0:00
25% |?..?..?..?.. | 317kB 56kB/s eta 0:00
26% |?..?..?..?..?. | 327kB 47kB/s eta 0:
26% |?..?..?..?..?. | 337kB 62kB/s eta 0:
27% |?..?..?..?..?. | 348kB 47kB/s eta 0:
28% |?..?..?..?..?.. | 358kB 47kB/s eta
29% |?..?..?..?..?.. | 368kB 36kB/s eta
30% |?..?..?..?..?.. | 378kB 34kB/s eta
31% |?..?..?..?..?.. | 389kB 36kB/s eta
31% |?..?..?..?..?..?. | 399kB 29kB/s et
32% |?..?..?..?..?..?. | 409kB 24kB/s et
33% |?..?..?..?..?..?. | 419kB 28kB/s et
34% |?..?..?..?..?..?. | 430kB 27kB/s et
35% |?..?..?..?..?..?.. | 440kB 27kB/s
35% |?..?..?..?..?..?.. | 450kB 25kB/s
36% |?..?..?..?..?..?.. | 460kB 23kB/s
37% |?..?..?..?..?..?.. | 471kB 27kB/s
38% |?..?..?..?..?..?..?. | 481kB 24kB/
39% |?..?..?..?..?..?..?. | 491kB 24kB/
39% |?..?..?..?..?..?..?. | 501kB 30kB/
40% |?..?..?..?..?..?..?. | 512kB 35kB/
41% |?..?..?..?..?..?..?.. | 522kB 31k
42% |?..?..?..?..?..?..?.. | 532kB 32k
43% |?..?..?..?..?..?..?.. | 542kB 25k
44% |?..?..?..?..?..?..?.. | 552kB 33k
44% |?..?..?..?..?..?..?..?. | 563kB 2
45% |?..?..?..?..?..?..?..?. | 573kB 1
46% |?..?..?..?..?..?..?..?. | 583kB 2
47% |?..?..?..?..?..?..?..?.. | 593kB
48% |?..?..?..?..?..?..?..?.. | 604kB
48% |?..?..?..?..?..?..?..?.. | 614kB
49% |?..?..?..?..?..?..?..?.. | 624kB
50% |?..?..?..?..?..?..?..?..?. | 634
51% |?..?..?..?..?..?..?..?..?. | 645
52% |?..?..?..?..?..?..?..?..?. | 655
53% |?..?..?..?..?..?..?..?..?. | 665
53% |?..?..?..?..?..?..?..?..?.. | 6
54% |?..?..?..?..?..?..?..?..?.. | 6
55% |?..?..?..?..?..?..?..?..?.. | 6
56% |?..?..?..?..?..?..?..?..?.. | 7
57% |?..?..?..?..?..?..?..?..?..?. |
57% |?..?..?..?..?..?..?..?..?..?. |
58% |?..?..?..?..?..?..?..?..?..?. |
59% |?..?..?..?..?..?..?..?..?..?. |
60% |?..?..?..?..?..?..?..?..?..?..
61% |?..?..?..?..?..?..?..?..?..?..
62% |?..?..?..?..?..?..?..?..?..?..
62% |?..?..?..?..?..?..?..?..?..?..
63% |?..?..?..?..?..?..?..?..?..?..?.
64% |?..?..?..?..?..?..?..?..?..?..?.
65% |?..?..?..?..?..?..?..?..?..?..?.
66% |?..?..?..?..?..?..?..?..?..?..?..
66% |?..?..?..?..?..?..?..?..?..?..?..
67% |?..?..?..?..?..?..?..?..?..?..?..
68% |?..?..?..?..?..?..?..?..?..?..?..
69% |?..?..?..?..?..?..?..?..?..?..?..?.
70% |?..?..?..?..?..?..?..?..?..?..?..?.
70% |?..?..?..?..?..?..?..?..?..?..?..?.
71% |?..?..?..?..?..?..?..?..?..?..?..?.
72% |?..?..?..?..?..?..?..?..?..?..?..?.
73% |?..?..?..?..?..?..?..?..?..?..?..?.
74% |?..?..?..?..?..?..?..?..?..?..?..?.
75% |?..?..?..?..?..?..?..?..?..?..?..?.
75% |?..?..?..?..?..?..?..?..?..?..?..?.
76% |?..?..?..?..?..?..?..?..?..?..?..?.
77% |?..?..?..?..?..?..?..?..?..?..?..?.
78% |?..?..?..?..?..?..?..?..?..?..?..?.
79% |?..?..?..?..?..?..?..?..?..?..?..?.
79% |?..?..?..?..?..?..?..?..?..?..?..?.
80% |?..?..?..?..?..?..?..?..?..?..?..?.
81% |?..?..?..?..?..?..?..?..?..?..?..?.
82% |?..?..?..?..?..?..?..?..?..?..?..?.
83% |?..?..?..?..?..?..?..?..?..?..?..?.
84% |?..?..?..?..?..?..?..?..?..?..?..?.
84% |?..?..?..?..?..?..?..?..?..?..?..?.
85% |?..?..?..?..?..?..?..?..?..?..?..?.
86% |?..?..?..?..?..?..?..?..?..?..?..?.
87% |?..?..?..?..?..?..?..?..?..?..?..?.
88% |?..?..?..?..?..?..?..?..?..?..?..?.
88% |?..?..?..?..?..?..?..?..?..?..?..?.
89% |?..?..?..?..?..?..?..?..?..?..?..?.
90% |?..?..?..?..?..?..?..?..?..?..?..?.
91% |?..?..?..?..?..?..?..?..?..?..?..?.
92% |?..?..?..?..?..?..?..?..?..?..?..?.
93% |?..?..?..?..?..?..?..?..?..?..?..?.
93% |?..?..?..?..?..?..?..?..?..?..?..?.
94% |?..?..?..?..?..?..?..?..?..?..?..?.
95% |?..?..?..?..?..?..?..?..?..?..?..?.
96% |?..?..?..?..?..?..?..?..?..?..?..?.
97% |?..?..?..?..?..?..?..?..?..?..?..?.
97% |?..?..?..?..?..?..?..?..?..?..?..?.
98% |?..?..?..?..?..?..?..?..?..?..?..?.
99% |?..?..?..?..?..?..?..?..?..?..?..?.
100% |?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..| 1.3MB 43kB/s
Installing collected packages: pip
Found existing installation: pip 8.1.2
Uninstalling pip-8.1.2:
Successfully uninstalled pip-8.1.2
Successfully installed pip-9.0.1
/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning