From f652a2b818e5635ae7f14c96bed3ebdb7d388f06 Mon Sep 17 00:00:00 2001 From: Robert Hafner Date: Wed, 16 Oct 2019 14:37:35 -0700 Subject: [PATCH] Update readme to work with newest Docker library When docker ditched the `docker-py` library in favor of `docker` on PyPI they made a few very very small changes that break this library. I've gone ahead and upgraded the readme to work with these new changes. I should point out that these changes are trivial- it basically amounts to changing `docker.client()` to `docker.APIClient()`. That's because the "low level API" that this project is based on has moved- but it is still there, and completely compatible with this library. Literally all anyone has to do in order to use the latest docker python library is change that one call so they get the low level client instead of the high level one. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c4d17c1..9d7059e 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ pip install dockerpty Dependencies: - * docker-py>=0.3.2 + * docker>=4 However, this library does not explicitly declare this dependency in PyPi for a number of reasons. It is assumed you have it installed. @@ -32,7 +32,7 @@ This obviously only works when run in a terminal. import docker import dockerpty -client = docker.Client() +client = docker.APIClient() container = client.create_container( image='busybox:latest', stdin_open=True,