Update docker build docs

This commit is contained in:
Guillaume J. Charmes 2013-05-30 12:35:19 -07:00
parent 6d2e3d2ec0
commit 28d5b2c15a
2 changed files with 7 additions and 18 deletions

View File

@ -131,8 +131,8 @@ func (cli *DockerCli) CmdInsert(args ...string) error {
} }
func (cli *DockerCli) CmdBuild(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") 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") tag := cmd.String("t", "", "Tag to be applied to the resulting image in case of success")
if err := cmd.Parse(args); err != nil { if err := cmd.Parse(args); err != nil {
return nil return nil
} }

View File

@ -8,32 +8,21 @@
:: ::
Usage: docker build [CONTEXT|-] Usage: docker build [OPTIONS] PATH | -
Build a new image from a Dockerfile 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 Examples
-------- --------
.. code-block:: bash .. code-block:: bash
docker build docker build .
This will take the local Dockerfile without context This will take the local Dockerfile
.. code-block:: bash .. code-block:: bash
docker build - docker build -
This will read a Dockerfile form Stdin without context 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