用于检查Docker容器文件系统内容的工具。

containerutil的Python项目详细描述


containerutil.Path为检查提供类似于pathlib.Path的api docker container文件系统:

importdockerimportcontainerutilclient=docker.from_env(version='auto')ctnr=client.containers.get('my-container')p=containerutil.Path(ctnr,'/foo/bar/path')p.exists()# True if file exists (regardless of type)p.is_file()# True if file exists and is a regular filep.is_symlink()# True if file exists and is a symbolic linkp.is_fifo()# True if file is a named pipe (FIFO)

安装

PyPI使用pip包管理器:

pip install --upgrade containerutil

或者从github安装最新的源代码:

pip install https://github.com/pavdmyt/containerutil/archive/master.zip

开发

克隆存储库:

git clone https://github.com/pavdmyt/containerutil.git

安装依赖项:

make install

lint代码:

make lint

运行测试:

make test

贡献

  1. 叉开!
  2. 创建功能分支:git checkout -bmy-new-feature
  3. 提交更改:git commit -m 'Add some feature'
  4. 推到分支:git push origin my-new-feature
  5. 提交拉取请求
  6. 确保测试通过

许可证

麻省理工学院-Pavlo Dmytrenko

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java为游戏添加声音。需要帮助   java在获取数据时忽略模型类中的forign键映射   java为什么Microsoft JDBC驱动程序忽略failoverPartner主机名   java可以下载mozswing文件   java等价于ObjectOutputStream,不仅保存其状态,还保存整个对象?   Java Android LiveData根据其他LiveData调用房间查询   java如何使用jackson jsonNode实现这一点并获得所需的输出   在web服务器上作为web应用程序运行java应用程序?   groovy中java类的元类属性   返回空指针的java图形对象   标头中包含用户名和密码的java SOAP客户端请求   具有堆栈实现和递归的Hanoi算法塔(Java)   java当我运行这两个类时,我的老鼠不会移动   使用图像进行java相似图像搜索   Java8并行流机制   使用单例对象作为枚举元素的java Scala枚举,是否有可能对它们进行迭代?   java Webview更改高度大小   不可序列化对象和函数的java Spark Scala编程   java my app在eclipse中运行良好,而不是在jar中