Skip to content

Commit

Permalink
add commit pause option
Browse files Browse the repository at this point in the history
Signed-off-by: VincentLeeMax <[email protected]>
  • Loading branch information
VincentLeeMax committed Jul 12, 2023
1 parent 84414e3 commit 82ca3d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docker/api/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def attach_socket(self, container, params=None, ws=False):

@utils.check_resource('container')
def commit(self, container, repository=None, tag=None, message=None,
author=None, changes=None, conf=None):
author=None, pause=True, changes=None, conf=None):
"""
Commit a container to an image. Similar to the ``docker commit``
command.
Expand All @@ -123,6 +123,7 @@ def commit(self, container, repository=None, tag=None, message=None,
tag (str): The tag to push
message (str): A commit message
author (str): The name of the author
pause (bool): Whether to pause the container before committing
changes (str): Dockerfile instructions to apply while committing
conf (dict): The configuration for the container. See the
`Engine API documentation
Expand All @@ -139,6 +140,7 @@ def commit(self, container, repository=None, tag=None, message=None,
'tag': tag,
'comment': message,
'author': author,
'pause': pause,
'changes': changes
}
u = self._url("/commit")
Expand Down
1 change: 1 addition & 0 deletions docker/models/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ def commit(self, repository=None, tag=None, **kwargs):
tag (str): The tag to push
message (str): A commit message
author (str): The name of the author
pause (bool): Whether to pause the container before committing
changes (str): Dockerfile instructions to apply while committing
conf (dict): The configuration for the container. See the
`Engine API documentation
Expand Down

0 comments on commit 82ca3d9

Please sign in to comment.