mirror of
https://github.com/clearlinux/docker.git
synced 2026-10-03 15:28:35 +00:00
Add labels documentation
Adds more documentation for labels and adds the label instruction to the man-pages. Also included is a document called "Labels - custom meta-data in Docker" in the user-guide, this is still a work-in-progress I started to describe the "namespaces" conventions, an example on storing structured data. I ran a bit "out of steam" (writers block?) on that document, but kept it in (for now), in case it still ends up useful. The Remote API documentation changes will need to be moved to the docker_remote_api_v1.18.md document when rebasing the whole PR. Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Signed-off-by: Darren Shepherd <darren@rancher.com>
This commit is contained in:
committed by
Darren Shepherd
parent
389eee1084
commit
7d89e66dac
@@ -331,13 +331,23 @@ default specified in `CMD`.
|
||||
## LABEL
|
||||
LABEL <key>=<value> <key>=<value> <key>=<value> ...
|
||||
|
||||
--The `LABEL` instruction allows you to describe the image your `Dockerfile`
|
||||
is building. `LABEL` is specified as name value pairs. This data can
|
||||
The `LABEL` instruction allows you to add meta-data to the image your
|
||||
`Dockerfile` is building. `LABEL` is specified as name value pairs. This data can
|
||||
be retrieved using the `docker inspect` command
|
||||
|
||||
LABEL com.example.label-without-value
|
||||
LABEL com.example.label-with-value="foo"
|
||||
LABEL version="1.0"
|
||||
LABEL description="This my ACME image" vendor="ACME Products"
|
||||
|
||||
LABEL Description="This image is used to start the foobar executable" Vendor="ACME Products"
|
||||
LABEL Version="1.0"
|
||||
As illustrated above, the `LABEL` instruction allows for multiple labels to be
|
||||
set at one time. Like command line parsing, quotes and backslashes can be used
|
||||
to include spaces within values.
|
||||
|
||||
For example:
|
||||
|
||||
LABEL description="This text illustrates \
|
||||
that label-values can span multiple lines."
|
||||
|
||||
## EXPOSE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user