From 957c510d729ac3dcbe892b145fb2d9ed766be2ca Mon Sep 17 00:00:00 2001 From: Victor Vieux Date: Tue, 1 Jul 2014 00:39:38 +0000 Subject: [PATCH] updated docs & tests Docker-DCO-1.1-Signed-off-by: Victor Vieux (github: vieux) --- docs/man/docker-commit.1.md | 3 +++ docs/sources/reference/api/docker_remote_api.md | 5 +++++ docs/sources/reference/commandline/cli.md | 2 +- integration-cli/docker_cli_commit_test.go | 4 ++-- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/man/docker-commit.1.md b/docs/man/docker-commit.1.md index e9f3393381..c0f2c734c5 100644 --- a/docs/man/docker-commit.1.md +++ b/docs/man/docker-commit.1.md @@ -19,6 +19,9 @@ Using an existing container's name or ID you can create a new image. **-m, --message**="" Commit message +**-p, --pause**=true + Pause container during commit + # EXAMPLES ## Creating a new image from an existing container diff --git a/docs/sources/reference/api/docker_remote_api.md b/docs/sources/reference/api/docker_remote_api.md index c3cce3ea3e..36f35383e1 100644 --- a/docs/sources/reference/api/docker_remote_api.md +++ b/docs/sources/reference/api/docker_remote_api.md @@ -49,6 +49,11 @@ daemon is configured to listen on. **New!** `start` and `stop` will now return 304 if the container's status is not modified +`POST /commit` + +**New!** +Added a `pause` parameter (default `true`) to pause the container during commit + ## v1.12 ### Full Documentation diff --git a/docs/sources/reference/commandline/cli.md b/docs/sources/reference/commandline/cli.md index ff41ec4324..770ac1177d 100644 --- a/docs/sources/reference/commandline/cli.md +++ b/docs/sources/reference/commandline/cli.md @@ -346,7 +346,7 @@ is better to use Dockerfiles to manage your images in a documented and maintainable way. By default, the container being committed and its processes will be paused -during the process of committing the image. This reduces the likelihood of +while the image is committed. This reduces the likelihood of encountering data corruption during the process of creating the commit. If this behavior is undesired, set the 'p' option to false. diff --git a/integration-cli/docker_cli_commit_test.go b/integration-cli/docker_cli_commit_test.go index 3a76a0f38a..7caf3588ce 100644 --- a/integration-cli/docker_cli_commit_test.go +++ b/integration-cli/docker_cli_commit_test.go @@ -45,7 +45,7 @@ func TestCommitWithoutPause(t *testing.T) { _, _, err = runCommandWithOutput(waitCmd) errorOut(err, t, fmt.Sprintf("error thrown while waiting for container: %s", out)) - commitCmd := exec.Command(dockerBinary, "commit", "-p", "false", cleanedContainerID) + commitCmd := exec.Command(dockerBinary, "commit", "-p=false", cleanedContainerID) out, _, err = runCommandWithOutput(commitCmd) errorOut(err, t, fmt.Sprintf("failed to commit container to image: %v %v", out, err)) @@ -58,7 +58,7 @@ func TestCommitWithoutPause(t *testing.T) { deleteContainer(cleanedContainerID) deleteImages(cleanedImageID) - logDone("commit - echo foo and commit the image") + logDone("commit - echo foo and commit the image with --pause=false") } func TestCommitNewFile(t *testing.T) {