From 389eee1084ea7613fa56e5f6b3e24678bf9aebc2 Mon Sep 17 00:00:00 2001 From: Darren Shepherd Date: Thu, 22 Jan 2015 13:47:10 -0700 Subject: [PATCH] Add docs for container/image labels Signed-off-by: Darren Shepherd --- docs/sources/reference/api/docker_remote_api.md | 17 +++++++++++++++++ .../reference/api/docker_remote_api_v1.17.md | 12 +++++++++++- docs/sources/reference/commandline/cli.md | 2 ++ 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/docs/sources/reference/api/docker_remote_api.md b/docs/sources/reference/api/docker_remote_api.md index 0919d511b7..95a3535d0c 100644 --- a/docs/sources/reference/api/docker_remote_api.md +++ b/docs/sources/reference/api/docker_remote_api.md @@ -83,10 +83,21 @@ to an image. For example you could add data describing the content of an image. **New!** Docker client now hints potential proxies about connection hijacking using HTTP Upgrade headers. +`POST /containers/create` + +**New!** +You can set labels on container create describing the container. + +`GET /containers/json` + +**New!** +This endpoint now returns the labels associated with each container (`Labels`). + `GET /containers/(id)/json` **New!** This endpoint now returns the list current execs associated with the container (`ExecIDs`). +This endpoint now returns the container labels (`Config.Labels`). `POST /containers/(id)/rename` @@ -105,6 +116,12 @@ root filesystem as read only. **New!** This endpoint returns a live stream of a container's resource usage statistics. +`GET /images/json` + +**New!** +This endpoint now returns the labels associated with each image (`Labels`). + + ## v1.16 ### Full Documentation diff --git a/docs/sources/reference/api/docker_remote_api_v1.17.md b/docs/sources/reference/api/docker_remote_api_v1.17.md index f4e16b29dc..050e027465 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.17.md +++ b/docs/sources/reference/api/docker_remote_api_v1.17.md @@ -194,6 +194,7 @@ Json Parameters: - **OpenStdin** - Boolean value, opens stdin, - **StdinOnce** - Boolean value, close stdin after the 1 attached client disconnects. - **Env** - A list of environment variables in the form of `VAR=value` +- **Labels** - A list of labels that will applied in the form of `VAR=value` - **Cmd** - Command to run specified as a string or an array of strings. - **Entrypoint** - Set the entrypoint for the container a a string or an array of strings @@ -303,6 +304,11 @@ Return low-level information on the container `id` "ExposedPorts": null, "Hostname": "ba033ac44011", "Image": "ubuntu", + "Labels": { + "Vendor": "Acme", + "License": "GPL", + "Version": "1.0" + }, "MacAddress": "", "Memory": 0, "MemorySwap": 0, @@ -1174,7 +1180,11 @@ Return low-level information on the image `name` "Cmd": ["/bin/bash"], "Dns": null, "Image": "ubuntu", - "Labels": null, + "Labels": { + "Vendor": "Acme", + "License": "GPL", + "Version": "1.0" + }, "Volumes": null, "VolumesFrom": "", "WorkingDir": "" diff --git a/docs/sources/reference/commandline/cli.md b/docs/sources/reference/commandline/cli.md index 1f61432b5a..08eb606c7b 100644 --- a/docs/sources/reference/commandline/cli.md +++ b/docs/sources/reference/commandline/cli.md @@ -1662,6 +1662,8 @@ removed before the image is removed. --link=[] Add link to another container --lxc-conf=[] Add custom lxc options -m, --memory="" Memory limit + -l, --label=[] Set meta data on a container, for example com.example.key=value + -label-file=[] Read in a line delimited file of labels --mac-address="" Container MAC address (e.g. 92:d0:c6:0a:29:33) --memory-swap="" Total memory (memory + swap), '-1' to disable swap --name="" Assign a name to the container