Merge pull request #12513 from allingeek/patch-1

builder.md - Changes to bring LABEL docs in line with 1.6 release.
This commit is contained in:
Sven Dowideit 2015-04-23 08:58:59 +10:00
commit b2aca01d95
1 changed files with 13 additions and 2 deletions

View File

@ -373,9 +373,8 @@ blackslashes as you would in command-line parsing.
LABEL "com.example.vendor"="ACME Incorporated" LABEL "com.example.vendor"="ACME Incorporated"
An image can have more than one label. To specify multiple labels, separate each An image can have more than one label. To specify multiple labels, separate each
key-value pair by an EOL. key-value pair with whitespace.
LABEL com.example.label-without-value
LABEL com.example.label-with-value="foo" LABEL com.example.label-with-value="foo"
LABEL version="1.0" LABEL version="1.0"
LABEL description="This text illustrates \ LABEL description="This text illustrates \
@ -385,6 +384,8 @@ Docker recommends combining labels in a single `LABEL` instruction where
possible. Each `LABEL` instruction produces a new layer which can result in an possible. Each `LABEL` instruction produces a new layer which can result in an
inefficient image if you use many labels. This example results in four image inefficient image if you use many labels. This example results in four image
layers. layers.
LABEL multi.label1="value1" multi.label2="value2" other="value3"
Labels are additive including `LABEL`s in `FROM` images. As the system Labels are additive including `LABEL`s in `FROM` images. As the system
encounters and then applies a new label, new `key`s override any previous labels encounters and then applies a new label, new `key`s override any previous labels
@ -392,6 +393,16 @@ with identical keys.
To view an image's labels, use the `docker inspect` command. To view an image's labels, use the `docker inspect` command.
"Labels": {
"com.example.vendor": "ACME Incorporated"
"com.example.label-with-value": "foo",
"version": "1.0",
"description": "This text illustrates that label-values can span multiple lines.",
"multi.label1": "value1",
"multi.label2": "value2",
"other": "value3"
},
## EXPOSE ## EXPOSE
EXPOSE <port> [<port>...] EXPOSE <port> [<port>...]