@@ -165,30 +165,46 @@ The filtering flag (`-f` or `--filter`) format is of "key=value". If you would
165165like to use multiple filters, pass multiple flags (e.g.,
166166` --filter "foo=bar" --filter "bif=baz" ` )
167167
168- Using the same filter multiple times will be handled as a * OR * ; for example
169- ` --filter container=588a23dac085 --filter container=a8f7720b8c22 ` will display
170- events for container 588a23dac085 * OR * container a8f7720b8c22
168+ When using multiple filters, filters are handled as an * AND * . The following
169+ example shows container ` start ` events for a container with ** ID ** or ** name **
170+ ` 588a23dac085 ` :
171171
172- Using multiple filters will be handled as a * AND* ; for example
173- ` --filter container=588a23dac085 --filter event=start ` will display events for
174- container container 588a23dac085 * AND* the event type is * start*
172+ ``` console
173+ $ docker events --filter container=588a23dac085 --filter event=start
174+ ````
175+
176+ When using the _same_ filter multiple times, those filters are handled as an
177+ *OR*. For example, the following example displays events for container with
178+ **name** (or **ID**) `588a23dac085` *OR* `a8f7720b8c22`:
179+
180+ ```console
181+ $ docker events --filter container=588a23dac085 --filter container=a8f7720b8c22
182+ ```
175183
176184The currently supported filters are:
177185
178- * config (` config=<name or id> ` )
179- * container (` container=<name or id> ` )
180- * daemon (` daemon=<name or id> ` )
181- * event (` event=<event action> ` )
182- * image (` image=<repository or tag> ` )
183- * label (` label=<key> ` or ` label=<key>=<value> ` )
184- * network (` network=<name or id> ` )
185- * node (` node=<id> ` )
186- * plugin (` plugin=<name or id> ` )
187- * scope (` scope=<local or swarm> ` )
188- * secret (` secret=<name or id> ` )
189- * service (` service=<name or id> ` )
190- * type (` type=<container or image or volume or network or daemon or plugin or service or node or secret or config> ` )
191- * volume (` volume=<name> ` )
186+ Filter | Example | Description
187+ ------------|:-----------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
188+ ` type ` | ` type=<object-type> ` | Only show events for the given object type. Valid values are ` config ` , ` container ` , ` daemon ` , ` image ` , ` network ` , ` node ` , ` plugin ` , ` secret ` , ` service ` , or ` volume ` .
189+ ` event ` | ` event=<event action> ` | Only show events with the given event action (e.g. ` create ` ).
190+ ` scope ` | ` scope=<local or swarm> ` | Only show events in the given scope. Use ` local ` for local events, and ` swarm ` for events in the Swarm cluster.
191+ ` label ` | ` label=<label-name> ` or ` label=<label-name>=<value> ` | Only show events for objects that have a label with the given ` label-name ` and (optionally) ` value ` .
192+
193+ The filters listed below allow you to filter by object reference (object ` name ` , ` name ` prefix, ` id ` , or ` id ` prefix).
194+
195+ Filter | Example | Description
196+ ------------|:-----------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
197+ ` config ` | ` config=<name or id> ` | Only show events for swarm configs with the given ` name ` or ` id ` .
198+ ` container ` | ` container=<name or id> ` | Only show events for containers with the given ` name ` or ` id ` .
199+ ` daemon ` | ` daemon=<name or id> ` | Only show events for daemons with the given ` name ` or ` id ` .
200+ ` image ` | ` image=<repository or tag> ` | Only show events for images with the given ` repository ` or ` tag ` .
201+ ` network ` | ` network=<name or id> ` | Only show events for swarm configs with the given ` name ` or ` id ` .
202+ ` node ` | ` node=<id> ` | Only show events for swarm nodes with the given ` id ` .
203+ ` plugin ` | ` plugin=<name or id> ` | Only show events for plugins with the given ` name ` or ` id ` .
204+ ` secret ` | ` secret=<name or id> ` | Only show events for swarm secrets with the given ` name ` or ` id ` .
205+ ` service ` | ` service=<name or id> ` | Only show events for swarm services with the given ` name ` or ` id ` .
206+ ` volume ` | ` volume=<name> ` | Only show events for volumes with the given ` name ` .
207+
192208
193209#### Format
194210
0 commit comments