Kaydet (Commit) 99b6ec11 authored tarafından Dima Spivak's avatar Dima Spivak

Add support for changes param to ContainerApiMixin.commit

docker commit --changes was added to Docker in 1.6.0.
Signed-off-by: 's avatarDima Spivak <dima@spivak.ch>
üst 5c1c4239
...@@ -40,13 +40,14 @@ class ContainerApiMixin(object): ...@@ -40,13 +40,14 @@ class ContainerApiMixin(object):
@utils.check_resource @utils.check_resource
def commit(self, container, repository=None, tag=None, message=None, def commit(self, container, repository=None, tag=None, message=None,
author=None, conf=None): author=None, changes=None, conf=None):
params = { params = {
'container': container, 'container': container,
'repo': repository, 'repo': repository,
'tag': tag, 'tag': tag,
'comment': message, 'comment': message,
'author': author 'author': author,
'changes': changes
} }
u = self._url("/commit") u = self._url("/commit")
return self._result(self._post_json(u, data=conf, params=params), return self._result(self._post_json(u, data=conf, params=params),
......
...@@ -123,6 +123,7 @@ Identical to the `docker commit` command. ...@@ -123,6 +123,7 @@ Identical to the `docker commit` command.
* tag (str): The tag to push * tag (str): The tag to push
* message (str): A commit message * message (str): A commit message
* author (str): The name of the author * author (str): The name of the author
* changes (str): Dockerfile instructions to apply while committing
* conf (dict): The configuration for the container. See the [Docker remote api]( * conf (dict): The configuration for the container. See the [Docker remote api](
https://docs.docker.com/reference/api/docker_remote_api/) for full details. https://docs.docker.com/reference/api/docker_remote_api/) for full details.
......
...@@ -101,7 +101,8 @@ class ImageTest(DockerClientTest): ...@@ -101,7 +101,8 @@ class ImageTest(DockerClientTest):
'comment': None, 'comment': None,
'tag': None, 'tag': None,
'container': '3cc2351ab11b', 'container': '3cc2351ab11b',
'author': None 'author': None,
'changes': None
}, },
timeout=DEFAULT_TIMEOUT_SECONDS timeout=DEFAULT_TIMEOUT_SECONDS
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment