Update containers.py

Signed-off-by: Dan <31395415+cakedan@users.noreply.github.com>
This commit is contained in:
Dan 2023-02-22 23:31:52 -07:00 committed by GitHub
parent cbd92808e6
commit 1754f1f812
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -316,7 +316,7 @@ class Container(Model):
""" """
return self.client.api.pause(self.id) return self.client.api.pause(self.id)
def put_archive(self, path, data): def put_archive(self, path, data, **kwargs):
""" """
Insert a file or folder in this container using a tar archive as Insert a file or folder in this container using a tar archive as
source. source.
@ -325,6 +325,7 @@ class Container(Model):
path (str): Path inside the container where the file(s) will be path (str): Path inside the container where the file(s) will be
extracted. Must exist. extracted. Must exist.
data (bytes or stream): tar data to be extracted data (bytes or stream): tar data to be extracted
copy_uid_gid (bool): copy UID/GID maps to the dest file or dir
Returns: Returns:
(bool): True if the call succeeds. (bool): True if the call succeeds.
@ -332,7 +333,7 @@ class Container(Model):
Raises: Raises:
:py:class:`~docker.errors.APIError` If an error occurs. :py:class:`~docker.errors.APIError` If an error occurs.
""" """
return self.client.api.put_archive(self.id, path, data) return self.client.api.put_archive(self.id, path, data, **kwargs)
def remove(self, **kwargs): def remove(self, **kwargs):
""" """