mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-05 21:21:42 +00:00
Add docs for label/env log-opts
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
@@ -73,6 +73,24 @@ Refer to the [log tag option documentation](log_tags.md) for customizing
|
||||
the log tag format.
|
||||
|
||||
|
||||
### labels and env
|
||||
|
||||
The `labels` and `env` options takes a comma-separated list of keys. If there is collision between `label` and `env` keys, the value of the `env` takes precedence.
|
||||
|
||||
To use attributes, specify them when you start the Docker daemon.
|
||||
|
||||
```
|
||||
docker daemon --log-driver=fluentd --log-opt labels=foo --log-opt env=foo,fizz
|
||||
```
|
||||
|
||||
Then, run a container and specify values for the `labels` or `env`. For example, you might use this:
|
||||
|
||||
```
|
||||
docker run --label foo=bar -e fizz=buzz -d -P training/webapp python app.py
|
||||
````
|
||||
|
||||
This adds additional fields to the extra attributes of a logging message.
|
||||
|
||||
## Fluentd daemon management with Docker
|
||||
|
||||
About `Fluentd` itself, see [the project webpage](http://www.fluentd.org)
|
||||
|
||||
Reference in New Issue
Block a user