mirror of
https://github.com/containers/podman.git
synced 2025-06-23 18:59:30 +08:00
Merge pull request #13243 from patrycja-guzik/docs2
[CI:DOCS] Unify ls --filter docs for networks and pods
This commit is contained in:
@ -12,20 +12,26 @@ Displays a list of existing podman networks.
|
|||||||
## OPTIONS
|
## OPTIONS
|
||||||
#### **--filter**, **-f**=*filter=value*
|
#### **--filter**, **-f**=*filter=value*
|
||||||
|
|
||||||
Filter output based on conditions given.
|
Provide filter values.
|
||||||
Multiple filters can be given with multiple uses of the --filter option.
|
|
||||||
Filters with the same key work inclusive with the only exception being
|
|
||||||
`label` which is exclusive. Filters with different keys always work exclusive.
|
|
||||||
|
|
||||||
Valid filters are listed below:
|
The *filters* argument format is of `key=value`. If there is more than one *filter*, then pass multiple OPTIONS: **--filter** *foo=bar* **--filter** *bif=baz*.
|
||||||
|
|
||||||
| **Filter** | **Description** |
|
Supported filters:
|
||||||
| ---------- | ----------------------------------------------------------------- |
|
|
||||||
| name | [Name] Network name (accepts regex) |
|
| **Filter** | **Description** |
|
||||||
| id | [ID] Full or partial network ID |
|
| ---------- | ------------------------------------------------------------------------------------------------ |
|
||||||
| label | [Key] or [Key=Value] Label assigned to a network |
|
| driver | Filter by driver type. |
|
||||||
| driver | [Driver] `bridge` or ,`macvlan` is supported |
|
| id | Filter by full or partial network ID. |
|
||||||
| until | [Until] Show all networks that were created before the given time |
|
| label | Filter by network with (or without, in the case of label!=[...] is used) the specified labels. |
|
||||||
|
| name | Filter by network name (accepts `regex`). |
|
||||||
|
| until | Filter by networks created before given timestamp. |
|
||||||
|
|
||||||
|
|
||||||
|
The `driver` filter accepts values: `bridge`, `macvlan`, `ipvlan`.
|
||||||
|
|
||||||
|
The `label` *filter* accepts two formats. One is the `label`=*key* or `label`=*key*=*value*, which shows images with the specified labels. The other format is the `label!`=*key* or `label!`=*key*=*value*, which shows images without the specified labels.
|
||||||
|
|
||||||
|
The `until` *filter* can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. 10m, 1h30m) computed relative to the machine’s time.
|
||||||
|
|
||||||
#### **--format**=*format*
|
#### **--format**=*format*
|
||||||
|
|
||||||
|
@ -86,25 +86,35 @@ Default: created
|
|||||||
|
|
||||||
#### **--filter**, **-f**=*filter*
|
#### **--filter**, **-f**=*filter*
|
||||||
|
|
||||||
Filter output based on conditions given.
|
Provide filter values.
|
||||||
Multiple filters can be given with multiple uses of the --filter flag.
|
|
||||||
Filters with the same key work inclusive with the only exception being
|
|
||||||
`label` which is exclusive. Filters with different keys always work exclusive.
|
|
||||||
|
|
||||||
Valid filters are listed below:
|
The *filters* argument format is of `key=value`. If there is more than one *filter*, then pass multiple OPTIONS: **--filter** *foo=bar* **--filter** *bif=baz*.
|
||||||
|
|
||||||
|
Supported filters:
|
||||||
|
|
||||||
|
| Filter | Description |
|
||||||
|
| ---------- | -------------------------------------------------------------------------------------------------- |
|
||||||
|
| *ctr-ids* | Filter by container ID within the pod. |
|
||||||
|
| *ctr-names* | Filter by container name within the pod. |
|
||||||
|
| *ctr-number*| Filter by number of containers in the pod. |
|
||||||
|
| *ctr-status*| Filter by container status within the pod. |
|
||||||
|
| *id* | Filter by pod ID. |
|
||||||
|
| *label* | Filter by container with (or without, in the case of label!=[...] is used) the specified labels. |
|
||||||
|
| *name* | Filter by pod name. |
|
||||||
|
| *network* | Filter by network name or full ID of network. |
|
||||||
|
| *status* | Filter by pod status. |
|
||||||
|
| *until* | Filter by pods created before given timestamp. |
|
||||||
|
|
||||||
|
The `ctr-ids`, `ctr-names`, `id`, `name` filters accept `regex` format.
|
||||||
|
|
||||||
|
The `ctr-status` filter accepts values: `created`, `running`, `paused`, `stopped`, `exited`, `unknown`.
|
||||||
|
|
||||||
|
The `label` *filter* accepts two formats. One is the `label`=*key* or `label`=*key*=*value*, which removes containers with the specified labels. The other format is the `label!`=*key* or `label!`=*key*=*value*, which removes containers without the specified labels.
|
||||||
|
|
||||||
|
The `until` *filter* can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. 10m, 1h30m) computed relative to the machine’s time.
|
||||||
|
|
||||||
|
The `status` filter accepts values: `stopped`, `running`, `paused`, `exited`, `dead`, `created`, `degraded`.
|
||||||
|
|
||||||
| **Filter** | **Description** |
|
|
||||||
| ---------- | ------------------------------------------------------------------------------------- |
|
|
||||||
| id | [ID] Pod's ID (accepts regex) |
|
|
||||||
| name | [Name] Pod's name (accepts regex) |
|
|
||||||
| label | [Key] or [Key=Value] Label assigned to a container |
|
|
||||||
| until | Only list pods created before given timestamp |
|
|
||||||
| status | Pod's status: `stopped`, `running`, `paused`, `exited`, `dead`, `created`, `degraded` |
|
|
||||||
| network | [Network] name or full ID of network |
|
|
||||||
| ctr-names | Container name within the pod (accepts regex) |
|
|
||||||
| ctr-ids | Container ID within the pod (accepts regex) |
|
|
||||||
| ctr-status | Container status within the pod |
|
|
||||||
| ctr-number | Number of containers in the pod |
|
|
||||||
|
|
||||||
#### **--help**, **-h**
|
#### **--help**, **-h**
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user