mirror of https://github.com/docker/cli.git
Adding network filter to docker ps command
Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
This commit is contained in:
parent
aa8edfdb77
commit
eef6bd0b23
|
@ -62,7 +62,7 @@ The currently supported filters are:
|
|||
* since (container's id or name) - filters containers created since given id or name
|
||||
* isolation (default|process|hyperv) (Windows daemon only)
|
||||
* volume (volume name or mount point) - filters containers that mount volumes.
|
||||
|
||||
* network (network name) - filters containers connected to the provided network name
|
||||
|
||||
#### Label
|
||||
|
||||
|
@ -207,6 +207,17 @@ The `volume` filter shows only containers that mount a specific volume or have a
|
|||
CONTAINER ID MOUNTS
|
||||
9c3527ed70ce remote-volume
|
||||
|
||||
#### Network
|
||||
|
||||
The `network` filter shows only containers that has endpoints on the provided network name.
|
||||
|
||||
$docker run -d --net=net1 --name=test1 ubuntu top
|
||||
$docker run -d --net=net2 --name=test2 ubuntu top
|
||||
|
||||
$docker ps --filter network=net1
|
||||
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
|
||||
9d4893ed80fe ubuntu "top" 10 minutes ago Up 10 minutes test1
|
||||
|
||||
|
||||
## Formatting
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ the running containers.
|
|||
- since=(<container-name>|<container-id>)
|
||||
- ancestor=(<image-name>[:tag]|<image-id>|<image@digest>) - containers created from an image or a descendant.
|
||||
- volume=(<volume-name>|<mount-point-destination>)
|
||||
- network=(<network-name>) - containers connected to the provided network name
|
||||
|
||||
**--format**="*TEMPLATE*"
|
||||
Pretty-print containers using a Go template.
|
||||
|
|
Loading…
Reference in New Issue