|
|
|
|
@ -98,7 +98,7 @@ func (cli *DockerCli) CmdHelp(args ...string) error {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (cli *DockerCli) CmdBuild(args ...string) error {
|
|
|
|
|
cmd := cli.Subcmd("build", "[OPTIONS] PATH | URL | -", "Build a new image from the source code at PATH")
|
|
|
|
|
cmd := cli.Subcmd("build", "PATH | URL | -", "Build a new image from the source code at PATH")
|
|
|
|
|
tag := cmd.String([]string{"t", "-tag"}, "", "Repository name (and optionally a tag) to be applied to the resulting image in case of success")
|
|
|
|
|
suppressOutput := cmd.Bool([]string{"q", "-quiet"}, false, "Suppress the verbose output generated by the containers")
|
|
|
|
|
noCache := cmd.Bool([]string{"#no-cache", "-no-cache"}, false, "Do not use cache when building the image")
|
|
|
|
|
@ -255,7 +255,7 @@ func (cli *DockerCli) CmdBuild(args ...string) error {
|
|
|
|
|
|
|
|
|
|
// 'docker login': login / register a user to registry service.
|
|
|
|
|
func (cli *DockerCli) CmdLogin(args ...string) error {
|
|
|
|
|
cmd := cli.Subcmd("login", "[OPTIONS] [SERVER]", "Register or log in to a Docker registry server, if no server is specified \""+registry.IndexServerAddress()+"\" is the default.")
|
|
|
|
|
cmd := cli.Subcmd("login", "[SERVER]", "Register or log in to a Docker registry server, if no server is specified \""+registry.IndexServerAddress()+"\" is the default.")
|
|
|
|
|
|
|
|
|
|
var username, password, email string
|
|
|
|
|
|
|
|
|
|
@ -529,7 +529,7 @@ func (cli *DockerCli) CmdInfo(args ...string) error {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (cli *DockerCli) CmdStop(args ...string) error {
|
|
|
|
|
cmd := cli.Subcmd("stop", "[OPTIONS] CONTAINER [CONTAINER...]", "Stop a running container by sending SIGTERM and then SIGKILL after a grace period")
|
|
|
|
|
cmd := cli.Subcmd("stop", "CONTAINER [CONTAINER...]", "Stop a running container by sending SIGTERM and then SIGKILL after a grace period")
|
|
|
|
|
nSeconds := cmd.Int([]string{"t", "-time"}, 10, "Number of seconds to wait for the container to stop before killing it. Default is 10 seconds.")
|
|
|
|
|
if err := cmd.Parse(args); err != nil {
|
|
|
|
|
return nil
|
|
|
|
|
@ -556,7 +556,7 @@ func (cli *DockerCli) CmdStop(args ...string) error {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (cli *DockerCli) CmdRestart(args ...string) error {
|
|
|
|
|
cmd := cli.Subcmd("restart", "[OPTIONS] CONTAINER [CONTAINER...]", "Restart a running container")
|
|
|
|
|
cmd := cli.Subcmd("restart", "CONTAINER [CONTAINER...]", "Restart a running container")
|
|
|
|
|
nSeconds := cmd.Int([]string{"t", "-time"}, 10, "Number of seconds to try to stop for before killing the container. Once killed it will then be restarted. Default is 10 seconds.")
|
|
|
|
|
if err := cmd.Parse(args); err != nil {
|
|
|
|
|
return nil
|
|
|
|
|
@ -954,7 +954,7 @@ func (cli *DockerCli) CmdRmi(args ...string) error {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (cli *DockerCli) CmdHistory(args ...string) error {
|
|
|
|
|
cmd := cli.Subcmd("history", "[OPTIONS] IMAGE", "Show the history of an image")
|
|
|
|
|
cmd := cli.Subcmd("history", "IMAGE", "Show the history of an image")
|
|
|
|
|
quiet := cmd.Bool([]string{"q", "-quiet"}, false, "Only show numeric IDs")
|
|
|
|
|
noTrunc := cmd.Bool([]string{"#notrunc", "-no-trunc"}, false, "Don't truncate output")
|
|
|
|
|
|
|
|
|
|
@ -1011,7 +1011,7 @@ func (cli *DockerCli) CmdHistory(args ...string) error {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (cli *DockerCli) CmdRm(args ...string) error {
|
|
|
|
|
cmd := cli.Subcmd("rm", "[OPTIONS] CONTAINER [CONTAINER...]", "Remove one or more containers")
|
|
|
|
|
cmd := cli.Subcmd("rm", "CONTAINER [CONTAINER...]", "Remove one or more containers")
|
|
|
|
|
v := cmd.Bool([]string{"v", "-volumes"}, false, "Remove the volumes associated with the container")
|
|
|
|
|
link := cmd.Bool([]string{"l", "#link", "-link"}, false, "Remove the specified link and not the underlying container")
|
|
|
|
|
force := cmd.Bool([]string{"f", "-force"}, false, "Force the removal of a running container (uses SIGKILL)")
|
|
|
|
|
@ -1051,7 +1051,7 @@ func (cli *DockerCli) CmdRm(args ...string) error {
|
|
|
|
|
|
|
|
|
|
// 'docker kill NAME' kills a running container
|
|
|
|
|
func (cli *DockerCli) CmdKill(args ...string) error {
|
|
|
|
|
cmd := cli.Subcmd("kill", "[OPTIONS] CONTAINER [CONTAINER...]", "Kill a running container using SIGKILL or a specified signal")
|
|
|
|
|
cmd := cli.Subcmd("kill", "CONTAINER [CONTAINER...]", "Kill a running container using SIGKILL or a specified signal")
|
|
|
|
|
signal := cmd.String([]string{"s", "-signal"}, "KILL", "Signal to send to the container")
|
|
|
|
|
|
|
|
|
|
if err := cmd.Parse(args); err != nil {
|
|
|
|
|
@ -1245,7 +1245,7 @@ func (cli *DockerCli) CmdPull(args ...string) error {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (cli *DockerCli) CmdImages(args ...string) error {
|
|
|
|
|
cmd := cli.Subcmd("images", "[OPTIONS] [NAME]", "List images")
|
|
|
|
|
cmd := cli.Subcmd("images", "[NAME]", "List images")
|
|
|
|
|
quiet := cmd.Bool([]string{"q", "-quiet"}, false, "Only show numeric IDs")
|
|
|
|
|
all := cmd.Bool([]string{"a", "-all"}, false, "Show all images (by default filter out the intermediate image layers)")
|
|
|
|
|
noTrunc := cmd.Bool([]string{"#notrunc", "-no-trunc"}, false, "Don't truncate output")
|
|
|
|
|
@ -1476,7 +1476,7 @@ func (cli *DockerCli) printTreeNode(noTrunc bool, image *engine.Env, prefix stri
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (cli *DockerCli) CmdPs(args ...string) error {
|
|
|
|
|
cmd := cli.Subcmd("ps", "[OPTIONS]", "List containers")
|
|
|
|
|
cmd := cli.Subcmd("ps", "", "List containers")
|
|
|
|
|
quiet := cmd.Bool([]string{"q", "-quiet"}, false, "Only display numeric IDs")
|
|
|
|
|
size := cmd.Bool([]string{"s", "-size"}, false, "Display sizes")
|
|
|
|
|
all := cmd.Bool([]string{"a", "-all"}, false, "Show all containers. Only running containers are shown by default.")
|
|
|
|
|
@ -1598,7 +1598,7 @@ func (cli *DockerCli) CmdPs(args ...string) error {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (cli *DockerCli) CmdCommit(args ...string) error {
|
|
|
|
|
cmd := cli.Subcmd("commit", "[OPTIONS] CONTAINER [REPOSITORY[:TAG]]", "Create a new image from a container's changes")
|
|
|
|
|
cmd := cli.Subcmd("commit", "CONTAINER [REPOSITORY[:TAG]]", "Create a new image from a container's changes")
|
|
|
|
|
flPause := cmd.Bool([]string{"p", "-pause"}, true, "Pause container during commit")
|
|
|
|
|
flComment := cmd.String([]string{"m", "-message"}, "", "Commit message")
|
|
|
|
|
flAuthor := cmd.String([]string{"a", "#author", "-author"}, "", "Author (e.g., \"John Hannibal Smith <hannibal@a-team.com>\")")
|
|
|
|
|
@ -1659,7 +1659,7 @@ func (cli *DockerCli) CmdCommit(args ...string) error {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (cli *DockerCli) CmdEvents(args ...string) error {
|
|
|
|
|
cmd := cli.Subcmd("events", "[OPTIONS]", "Get real time events from the server")
|
|
|
|
|
cmd := cli.Subcmd("events", "", "Get real time events from the server")
|
|
|
|
|
since := cmd.String([]string{"#since", "-since"}, "", "Show all events created since timestamp")
|
|
|
|
|
until := cmd.String([]string{"-until"}, "", "Stream events until this timestamp")
|
|
|
|
|
if err := cmd.Parse(args); err != nil {
|
|
|
|
|
@ -1795,7 +1795,7 @@ func (cli *DockerCli) CmdLogs(args ...string) error {
|
|
|
|
|
|
|
|
|
|
func (cli *DockerCli) CmdAttach(args ...string) error {
|
|
|
|
|
var (
|
|
|
|
|
cmd = cli.Subcmd("attach", "[OPTIONS] CONTAINER", "Attach to a running container")
|
|
|
|
|
cmd = cli.Subcmd("attach", "CONTAINER", "Attach to a running container")
|
|
|
|
|
noStdin = cmd.Bool([]string{"#nostdin", "-no-stdin"}, false, "Do not attach STDIN")
|
|
|
|
|
proxy = cmd.Bool([]string{"#sig-proxy", "-sig-proxy"}, true, "Proxy all received signals to the process (even in non-TTY mode). SIGCHLD, SIGKILL, and SIGSTOP are not proxied.")
|
|
|
|
|
)
|
|
|
|
|
@ -1923,7 +1923,7 @@ func (cli *DockerCli) CmdSearch(args ...string) error {
|
|
|
|
|
type ports []int
|
|
|
|
|
|
|
|
|
|
func (cli *DockerCli) CmdTag(args ...string) error {
|
|
|
|
|
cmd := cli.Subcmd("tag", "[OPTIONS] IMAGE[:TAG] [REGISTRYHOST/][USERNAME/]NAME[:TAG]", "Tag an image into a repository")
|
|
|
|
|
cmd := cli.Subcmd("tag", "IMAGE[:TAG] [REGISTRYHOST/][USERNAME/]NAME[:TAG]", "Tag an image into a repository")
|
|
|
|
|
force := cmd.Bool([]string{"f", "#force", "-force"}, false, "Force")
|
|
|
|
|
if err := cmd.Parse(args); err != nil {
|
|
|
|
|
return nil
|
|
|
|
|
@ -1992,7 +1992,7 @@ func (cli *DockerCli) pullImage(image string) error {
|
|
|
|
|
|
|
|
|
|
func (cli *DockerCli) CmdRun(args ...string) error {
|
|
|
|
|
// FIXME: just use runconfig.Parse already
|
|
|
|
|
config, hostConfig, cmd, err := runconfig.ParseSubcommand(cli.Subcmd("run", "[OPTIONS] IMAGE [COMMAND] [ARG...]", "Run a command in a new container"), args, nil)
|
|
|
|
|
config, hostConfig, cmd, err := runconfig.ParseSubcommand(cli.Subcmd("run", "IMAGE [COMMAND] [ARG...]", "Run a command in a new container"), args, nil)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|