First, the system Environment version introduction:
3.10. 0-229. El7.x86_64python2.7. 5 six-version:python-six-1.3. 0-4. El7.noarchdocker-version:docker-1.6. 2-el7.centos.x86_64docker1.1. 0
Second, docker-py configuration installation:
Source code downloaded from github: https://github.com/docker/docker-py.git
Select version after download:
$ git Tag#view the available tags
$ git checkout tags/1.1.0#checkout the tag of version
Third, start the Docker service to test whether the installation was successful:
$ service Docker start
[Email protected] docker-py]# Pythonpython2.7.5(Default, June - the, -: One: the) [GCC4.8.2 20140120(Red Hat4.8.2- -)] on Linux2type" Help","Copyright","credits"Or"License" for Moreinformation.>>>From Docker import Client>>> C = Client (base_url='Unix://var/run/docker.sock')>>> C.images (all=True) [{u'Created':1437311326, u'Labels': {}, U'VirtualSize': ...]
Four, the question discussion:
(1) Docker-py current development version seems to python2.7 support is not enough, the following error occurred:
(2) with PIP installation docker-py More is not reliable, the hint can not find Urllib library, do you want to install this on the Python3?
Docker-py Environment Configuration