From 28d5b2c15acc6e088a0abd2099a00ba1180beb3e Mon Sep 17 00:00:00 2001 From: "Guillaume J. Charmes" Date: Thu, 30 May 2013 12:35:19 -0700 Subject: [PATCH] Update docker build docs --- commands.go | 4 ++-- docs/sources/commandline/command/build.rst | 21 +++++---------------- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/commands.go b/commands.go index c24a48f5a0..14491d31a1 100644 --- a/commands.go +++ b/commands.go @@ -131,8 +131,8 @@ func (cli *DockerCli) CmdInsert(args ...string) error { } func (cli *DockerCli) CmdBuild(args ...string) error { - cmd := Subcmd("build", "PATH | -", "Build a new container image from the source code at PATH") - tag := cmd.String("t", "", "Tag to be applied to the resulting image") + cmd := Subcmd("build", "[OPTIONS] PATH | -", "Build a new container image from the source code at PATH") + tag := cmd.String("t", "", "Tag to be applied to the resulting image in case of success") if err := cmd.Parse(args); err != nil { return nil } diff --git a/docs/sources/commandline/command/build.rst b/docs/sources/commandline/command/build.rst index f7df8cbbc3..81120b22d2 100644 --- a/docs/sources/commandline/command/build.rst +++ b/docs/sources/commandline/command/build.rst @@ -8,32 +8,21 @@ :: - Usage: docker build [CONTEXT|-] - Build a new image from a Dockerfile + Usage: docker build [OPTIONS] PATH | - + Build a new container image from the source code at PATH + -t="": Tag to be applied to the resulting image in case of success. Examples -------- .. code-block:: bash - docker build + docker build . -This will take the local Dockerfile without context +This will take the local Dockerfile .. code-block:: bash docker build - This will read a Dockerfile form Stdin without context - -.. code-block:: bash - - docker build . - -This will take the local Dockerfile and set the current directory as context - -.. code-block:: bash - - docker build - . - -This will read a Dockerfile from Stdin and set the current directory as context