Add ability to add multiple tags with docker build

Signed-off-by: Shijiang Wei <mountkin@gmail.com>
This commit is contained in:
Shijiang Wei
2015-08-30 21:48:03 +08:00
committed by Tibor Vass
parent a41d4dbdde
commit 9d9976ae3a
3 changed files with 24 additions and 3 deletions

View File

@ -31,7 +31,7 @@ parent = "smn_cli"
--pull=false Always attempt to pull a newer version of the image
-q, --quiet=false Suppress the verbose output generated by the containers
--rm=true Remove intermediate containers after a successful build
-t, --tag="" Repository name (and optionally a tag) for the image
-t, --tag=[] Name and optionally a tag in the 'name:tag' format
--ulimit=[] Ulimit options
Builds Docker images from a Dockerfile and a "context". A build's context is
@ -227,6 +227,14 @@ uploaded context. The builder reference contains detailed information on
This will build like the previous example, but it will then tag the resulting
image. The repository name will be `vieux/apache` and the tag will be `2.0`
You can apply multiple tags to an image. For example, you can apply the `latest`
tag to a newly built image and add another tag that references a specific
version.
For example, to tag an image both as `whenry/fedora-jboss:latest` and
`whenry/fedora-jboss:v2.1`, use the following:
$ docker build -t whenry/fedora-jboss:latest -t whenry/fedora-jboss:v2.1 .
### Specify Dockerfile (-f)
$ docker build -f Dockerfile.debug .