Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Commit 959435e

Browse files
authored
Merge pull request #210 from carmark/commit
commit sub-command
2 parents bbda7ed + 330e026 commit 959435e

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

api/client/commit.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,26 @@ import (
44
"encoding/json"
55
"fmt"
66

7-
"golang.org/x/net/context"
8-
97
"github.com/docker/engine-api/types"
108
"github.com/docker/engine-api/types/container"
119
Cli "github.com/hyperhq/hypercli/cli"
1210
"github.com/hyperhq/hypercli/opts"
1311
flag "github.com/hyperhq/hypercli/pkg/mflag"
12+
"golang.org/x/net/context"
1413
)
1514

1615
// CmdCommit creates a new image from a container's changes.
1716
//
18-
// Usage: docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]
19-
func (cli *DockerCli) Commit(args ...string) error {
17+
// Usage: hyper commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]
18+
func (cli *DockerCli) CmdCommit(args ...string) error {
2019
cmd := Cli.Subcmd("commit", []string{"CONTAINER [REPOSITORY[:TAG]]"}, Cli.DockerCommands["commit"].Description, true)
21-
flPause := cmd.Bool([]string{"p", "-pause"}, true, "Pause container during commit")
20+
flPause := cmd.Bool([]string{}, true, "Pause container during commit")
2221
flComment := cmd.String([]string{"m", "-message"}, "", "Commit message")
2322
flAuthor := cmd.String([]string{"a", "-author"}, "", "Author (e.g., \"John Hannibal Smith <[email protected]>\")")
2423
flChanges := opts.NewListOpts(nil)
2524
cmd.Var(&flChanges, []string{"c", "-change"}, "Apply Dockerfile instruction to the created image")
2625
// FIXME: --run is deprecated, it will be replaced with inline Dockerfile commands.
27-
flConfig := cmd.String([]string{"#-run"}, "", "This option is deprecated and will be removed in a future version in favor of inline Dockerfile-compatible commands")
26+
flConfig := cmd.String([]string{}, "", "This option is deprecated and will be removed in a future version in favor of inline Dockerfile-compatible commands")
2827
cmd.Require(flag.Max, 2)
2928
cmd.Require(flag.Min, 1)
3029

cli/common.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ type Command struct {
2828
var dockerCommands = []Command{
2929
{"attach", "Attach to a running container"},
3030
//{"build", "Build an image from a Dockerfile"},
31-
//{"commit", "Create a new image from a container's changes"},
31+
{"commit", "Create a new image from a container's changes"},
3232
{"config", "Config access key and secret key to Hyper server"},
3333
//{"cp", "Copy files/folders between a container and the local filesystem"},
3434
{"create", "Create a new container"},

0 commit comments

Comments
 (0)