centos7 Docker 三剑客之compose安装

第一步  pip install --upgrade pip

[root@root ~]# pip install --upgrade pip
Collecting pip
  Downloading http://mirrors.aliyun.com/pypi/packages/c2/d7/90f34cb0d83a6c5631cf71dfe64cc1054598c843a92b400e55675cc2ac37/pip-18.1-py2.py3-none-any.whl (1.3MB)
    100% |████████████████████████████████| 1.3MB 73.6MB/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-18.1


第二步 pip install docker-compose==1.22

[root@root ~]# pip install docker-compose==1.22
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
Collecting docker-compose==1.22
  Downloading http://mirrors.aliyun.com/pypi/packages/67/03/b833b571595e05c933d3af3685be3b27b1166c415d005b3eadaa5be80d25/docker_compose-1.22.0-py2.py3-none-any.whl (126kB)
    100% |████████████████████████████████| 133kB 16.3MB/s 
Requirement already satisfied: PyYAML<4,>=3.10 in /usr/lib64/python2.7/site-packages (from docker-compose==1.22) (3.12)
Requirement already satisfied: backports.ssl-match-hostname>=3.5; python_version < "3.5" in /usr/lib/python2.7/site-packages (from docker-compose==1.22) (3.5.0.1)
Collecting six<2,>=1.3.0 (from docker-compose==1.22)
  Downloading http://mirrors.aliyun.com/pypi/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Collecting docker<4.0,>=3.4.1 (from docker-compose==1.22)
  Downloading http://mirrors.aliyun.com/pypi/packages/06/0b/ce97eb31058eddaef316973b8299b737ebab0bcb5798fd5a3225d53b4455/docker-3.5.0-py2.py3-none-any.whl (125kB)
    100% |████████████████████████████████| 133kB 81.7MB/s 
Collecting texttable<0.10,>=0.9.0 (from docker-compose==1.22)
  Downloading http://mirrors.aliyun.com/pypi/packages/02/e1/2565e6b842de7945af0555167d33acfc8a615584ef7abd30d1eae00a4d80/texttable-0.9.1.tar.gz
Collecting dockerpty<0.5,>=0.4.1 (from docker-compose==1.22)
  Downloading http://mirrors.aliyun.com/pypi/packages/8d/ee/e9ecce4c32204a6738e0a5d5883d3413794d7498fe8b06f44becc028d3ba/dockerpty-0.4.1.tar.gz
Requirement already satisfied: ipaddress>=1.0.16; python_version < "3.3" in /usr/lib/python2.7/site-packages (from docker-compose==1.22) (1.0.16)
Requirement already satisfied: requests!=2.11.0,!=2.12.2,!=2.18.0,<2.19,>=2.6.1 in /usr/lib/python2.7/site-packages (from docker-compose==1.22) (2.18.3)
Collecting websocket-client<1.0,>=0.32.0 (from docker-compose==1.22)
  Downloading http://mirrors.aliyun.com/pypi/packages/14/d4/6a8cd4e7f67da465108c7cc0a307a1c5da7e2cdf497330b682069b1d4758/websocket_client-0.53.0-py2.py3-none-any.whl (198kB)
    100% |████████████████████████████████| 204kB 80.6MB/s 
Collecting enum34<2,>=1.0.4; python_version < "3.4" (from docker-compose==1.22)
  Downloading http://mirrors.aliyun.com/pypi/packages/c5/db/e56e6b4bbac7c4a06de1c50de6fe1ef3810018ae11732a50f15f62c7d050/enum34-1.1.6-py2-none-any.whl
Collecting docopt<0.7,>=0.6.1 (from docker-compose==1.22)
  Downloading http://mirrors.aliyun.com/pypi/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-0.6.2.tar.gz
Collecting jsonschema<3,>=2.5.1 (from docker-compose==1.22)
  Downloading http://mirrors.aliyun.com/pypi/packages/77/de/47e35a97b2b05c2fadbec67d44cfcdcd09b8086951b331d82de90d2912da/jsonschema-2.6.0-py2.py3-none-any.whl
Collecting cached-property<2,>=1.2.0 (from docker-compose==1.22)
  Downloading http://mirrors.aliyun.com/pypi/packages/3b/86/85c1be2e8db9e13ef9a350aecd6dea292bd612fa288c2f40d035bb750ded/cached_property-1.5.1-py2.py3-none-any.whl
Collecting docker-pycreds>=0.3.0 (from docker<4.0,>=3.4.1->docker-compose==1.22)
  Downloading http://mirrors.aliyun.com/pypi/packages/ea/bf/7e70aeebc40407fbdb96fa9f79fc8e4722ea889a99378303e3bcc73f4ab5/docker_pycreds-0.3.0-py2.py3-none-any.whl
Requirement already satisfied: idna<2.6,>=2.5 in /usr/lib/python2.7/site-packages (from requests!=2.11.0,!=2.12.2,!=2.18.0,<2.19,>=2.6.1->docker-compose==1.22) (2.5)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in /usr/lib/python2.7/site-packages (from requests!=2.11.0,!=2.12.2,!=2.18.0,<2.19,>=2.6.1->docker-compose==1.22) (1.22)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/lib/python2.7/site-packages (from requests!=2.11.0,!=2.12.2,!=2.18.0,<2.19,>=2.6.1->docker-compose==1.22) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python2.7/site-packages (from requests!=2.11.0,!=2.12.2,!=2.18.0,<2.19,>=2.6.1->docker-compose==1.22) (2017.7.27.1)
Collecting functools32; python_version == "2.7" (from jsonschema<3,>=2.5.1->docker-compose==1.22)
  Downloading http://mirrors.aliyun.com/pypi/packages/5e/1a/0aa2c8195a204a9f51284018562dea77e25511f02fe924fac202fc012172/functools32-3.2.3-2.zip
Installing collected packages: six, websocket-client, docker-pycreds, docker, texttable, dockerpty, enum34, docopt, functools32, jsonschema, cached-property, docker-compose
  Running setup.py install for texttable ... done
  Running setup.py install for dockerpty ... done
  Running setup.py install for docopt ... done
  Running setup.py install for functools32 ... done
Successfully installed cached-property-1.5.1 docker-3.5.0 docker-compose-1.22.0 docker-pycreds-0.3.0 dockerpty-0.4.1 docopt-0.6.2 enum34-1.1.6 functools32-3.2.3.post2 jsonschema-2.6.0 six-1.11.0 texttable-0.9.1 websocket-client-0.53.0

第三步 查看版本 docker-compose -v

[root@root ~]# docker-compose -v
/usr/lib/python2.7/site-packages/requests/__init__.py:80: RequestsDependencyWarning: urllib3 (1.22) or chardet (2.2.1) doesn't match a supported version!
  RequestsDependencyWarning)
docker-compose version 1.22.0, build f46880f

注意:如果出现 /usr/lib/python2.7/site-packages/requests/__init__.py:80: RequestsDependencyWarning: urllib3 (1.22) or chardet (2.2.1) doesn't match a supported version!
  RequestsDependencyWarning)

第四步  解决办法

[root@root ~]# pip uninstall urllib3
Uninstalling urllib3-1.22:
  Would remove:
    /usr/lib/python2.7/site-packages/urllib3-1.22.dist-info/*
    /usr/lib/python2.7/site-packages/urllib3/*
Proceed (y/n)? y
  Successfully uninstalled urllib3-1.22
[root@root ~]# pip uninstall chardet
Uninstalling chardet-3.0.4:
  Would remove:
    /usr/bin/chardetect
    /usr/lib/python2.7/site-packages/chardet-3.0.4.dist-info/*
    /usr/lib/python2.7/site-packages/chardet/*
  Would not remove (might be manually added):
    /usr/lib/python2.7/site-packages/chardet/chardetect.py
    /usr/lib/python2.7/site-packages/chardet/chardetect.pyo
    /usr/lib/python2.7/site-packages/chardet/constants.py
    /usr/lib/python2.7/site-packages/chardet/constants.pyo
Proceed (y/n)? y
  Successfully uninstalled chardet-3.0.4
[root@root ~]# pip install requests
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
Requirement already satisfied: requests in /usr/lib/python2.7/site-packages (2.18.3)
Requirement already satisfied: idna<2.6,>=2.5 in /usr/lib/python2.7/site-packages (from requests) (2.5)
Collecting urllib3<1.23,>=1.21.1 (from requests)
  Downloading http://mirrors.aliyun.com/pypi/packages/63/cb/6965947c13a94236f6d4b8223e21beb4d576dc72e8130bd7880f600839b8/urllib3-1.22-py2.py3-none-any.whl (132kB)
    100% |████████████████████████████████| 133kB 4.0MB/s 
Collecting chardet<3.1.0,>=3.0.2 (from requests)
  Downloading http://mirrors.aliyun.com/pypi/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB)
    100% |████████████████████████████████| 143kB 100.8MB/s 
Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python2.7/site-packages (from requests) (2017.7.27.1)
Installing collected packages: urllib3, chardet
  Found existing installation: chardet 2.2.1
    Uninstalling chardet-2.2.1:
      Successfully uninstalled chardet-2.2.1
Successfully installed chardet-3.0.4 urllib3-1.22

第五步 再查看版本

[root@root ~]# docker-compose -v
docker-compose version 1.22.0, build f46880f

结束

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值