mirror of https://github.com/docker/docker-py.git
Implement client.copy(), which works much like export()
This commit is contained in:
parent
31a2b40d8d
commit
0b26b696e1
|
@ -286,6 +286,13 @@ class Client(requests.Session):
|
|||
"image first.".format(config['Image']))
|
||||
return self._result(res, True)
|
||||
|
||||
def copy(self, container, resource):
|
||||
res = self._post_json(self._url("/containers/{0}/copy".format(container)),
|
||||
{"Resource": resource},
|
||||
stream=True)
|
||||
self._raise_for_status(res)
|
||||
return res.raw
|
||||
|
||||
def diff(self, container):
|
||||
return self._result(self.get(self._url("/containers/{0}/changes".
|
||||
format(container))), True)
|
||||
|
|
Loading…
Reference in New Issue