1)两者的安装方式

pip install docker

A Python library for the Docker Engine API
pip install docker-py
A Python library for the Docker Remote API.

2)两者的区别
In this repository, we use docker-py (in requirements.txt, or in Dockerfile-alpine).
This is older package, last version 1.10.6 on pypi is from 2016-11-02.
The newer package is called docker (newest ver. 2.2.1 from 2017-03-28).
Besides the ambiguous name, docker package is incompatible with docker-py.
在这个存储库中,我们使用docker-py(在requirements.txt中,或在Dockerfile-alpine中)。
这是较旧的软件包,pypi的最新版本1.10.6是2016-11-02。
较新的包称为docker(2017-03-28最新版本2.2.1)。
除了模糊的名称,docker包与docker-py不兼容。

the breaking changes (and new features) from version 1.10.6 (docker-py) to 2.0.0 (docker) can be found at docker-py documentation.
The relevant changes, I think, are:
从版本1.10.6(docker-py)到2.0.0(docker)的重大更改(和新功能)可以在docker-py文档中找到。
我认为相关的变化是:
docker.Client has been renamed to docker.APIClient
docker.from_env now creates a DockerClient instance instead of an APIClient instance
create_host_config, create_ipam_pool and create_ipam_config have been removed from docker.utils.
They have been replaced by the following classes in docker.types: HostConfig, IPAMPool and IPAMCOnfig.
(new feature) Added a high-level, user-focused API as docker.DockerClient
docker.Client已重命名为docker.APIClient
docker.from_env现在创建一个DockerClient实例而不是APIClient实例
已从docker.utils中删除create_host_config,create_ipam_pool和create_ipam_config。
它们已被docker.types中的以下类替换:HostConfig,IPAMPool和IPAMCOnfig。
(新功能)添加了一个高级的,以用户为中心的API作为docker.DockerClient

Python lib库docker-py和docker的区别的更多相关文章

  1. python 查询文件修改python lib 库文件

    运行code import os, time import sys import re def search(path, name): for root, dirs, files in os.walk ...

  2. python文件读取,替换(带格式,python lib 库)

    import os, time import sys import re def read_old_part(filename, start, end): content = [] recording ...

  3. Python uuid库中 几个uuid的区别

    在用到uuid库的时候,发现uuid有很多个,比较好奇,就查了一下他们的区别 uuid1()——基于时间戳 uuid2()——基于分布式计算环境DCE(Python中没有这个函数) uuid3()—— ...

  4. python常用库

    本文由 伯乐在线 - 艾凌风 翻译,Namco 校稿.未经许可,禁止转载!英文出处:vinta.欢迎加入翻译组. Awesome Python ,这又是一个 Awesome XXX 系列的资源整理,由 ...

  5. Python常用库大全

    环境管理 管理 Python 版本和环境的工具 p – 非常简单的交互式 python 版本管理工具. pyenv – 简单的 Python 版本管理工具. Vex – 可以在虚拟环境中执行命令. v ...

  6. python的库小全

    环境管理 管理 Python 版本和环境的工具 p – 非常简单的交互式 python 版本管理工具. pyenv – 简单的 Python 版本管理工具. Vex – 可以在虚拟环境中执行命令. v ...

  7. python 三方库

    ---------------- 这又是一个 Awesome XXX 系列的资源整理,由 vinta 发起和维护.内容包括:Web框架.网络爬虫.网络内容提取.模板引擎.数据库.数据可视化.图片处理. ...

  8. Python常用库大全,看看有没有你需要的

    作者:史豹链接:https://www.zhihu.com/question/20501628/answer/223340838来源:知乎著作权归作者所有.商业转载请联系作者获得授权,非商业转载请注明 ...

  9. python 常用库收集

    读者您好.今天我将介绍20个属于我常用工具的Python库,我相信你看完之后也会觉得离不开它们.他们是: Requests.Kenneth Reitz写的最富盛名的http库.每个Python程序员都 ...

随机推荐

  1. Java-API:java.text.SimpleDateFormat

    ylbtech-Java-API:java.text.SimpleDateFormat 1.返回顶部   2.返回顶部   3.返回顶部   4.返回顶部   5.返回顶部 0. https://do ...

  2. IDEA编译器如何去掉注释中参数错误的提示

    在使用idea的导入别人的项目的时候经常会在方法注释中出现参数错误的提示,这时我们可以参考下面的配置,将方法注释中的参数错误的提示,更新为警告提示~~ 具体使用方法,参考下图~

  3. UTF-8, Unicode, GB2312格式串转换之C语言版

    原住址:http://www.cnitblog.com/wujian-IT/archive/2007/12/13/37671.html           /*      author:   wu.j ...

  4. 侯捷STL学习(12)--STL相关内容hash+tuple

    layout: post title: 侯捷STL学习(12) date: 2017-08-01 tag: 侯捷STL --- 第四讲 STL相关的内容 Hash Function 将hash函数封装 ...

  5. pycharm中 unittests in xxxx 运行模式

    pycham中 当你运行时 ,使用的 是  Run "unittests in  xxxx" 模式时候,if __name__ == '__main__':  后面的代码是不执行的 ...

  6. CMake 使用方法 & CMakeList.txt<转>

    CMake 使用方法 & CMakeList.txt cmake 简介 CMake是一个跨平台的安装(编译)工具,可以用简单的语句来描述所有平台的安装(编译过程).他能够输出各种各样的make ...

  7. ubuntu 12.04 下 eclipse关联 source code

    一.JDK source code 命令行中: sudo apt-get install openjdk-7-source 下好的jdk源码在 Linux 在目录 usr/lib/jvm/openjd ...

  8. UML在实践中的现状和一些建议

    本文是我在csdn上看到的文章,由于认识中的共鸣,摘抄至此. 原文地址:http://blog.csdn.net/vrman/article/details/280157 UML在国内不少地方获得了应 ...

  9. C++之deque

    deque(包含头文件#include<deque>)由若干段连续空间串接而成,一旦有必要在deque的头部或尾端增加新的空间,便配置一段定量连续的空间,串接在deque的头部或尾端.de ...

  10. WebView三个方法区别(解决乱码问题)

    最近使用WebView加载中文网页的时候出现乱码问题,网上整理下基本解决方法: 其实我发现这不管是在线还是离线显示都可以使用LoadUrl方法!联网时好像是默认utf-8,离线读取本地时需要设置默认编 ...