NAME¶ 名称
podman-network-ls - Display a summary of networks
podman-network-ls - 显示网络摘要
SYNOPSIS¶ 概要
podman network ls [options]
podman 网络 ls [选项]
DESCRIPTION¶ 描述
Displays a list of existing podman networks.
显示现有的 podman 网络列表
OPTIONS¶ 选项
--filter, -f=filter=value¶
Provide filter values. 提供过滤器值。
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.
过滤器参数格式为 key=value
。如果有多个过滤器,则传递多个选项:--filter foo=bar --filter bif=baz。
Supported filters: 支持的过滤器:
Filter |
Description |
---|---|
driver |
Filter by driver type. 按驱动程序类型筛选。 |
id |
Filter by full or partial network ID. |
label |
Filter by network with (or without, in the case of label!=[…] is used) the specified labels. |
name |
Filter by network name (accepts |
until |
Filter by networks created before given timestamp. |
dangling |
Filter by networks with no containers attached. |
The driver
filter accepts values: bridge
, macvlan
, ipvlan
.
driver
过滤器接受值: 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.
label
过滤器接受两种格式。一种是 label
=key 或 label
=key=value,显示具有指定标签的图像。另一种格式是 label!
=key 或 label!
=key=value,显示不具有指定标签的图像。
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.
until
过滤器可以是 Unix 时间戳、日期格式化的时间戳,或者是相对于机器时间计算的 Go 时长字符串(例如 10m,1h30m)。
The dangling
filter accepts values true
or false
.
dangling
过滤器接受值 true
或 false
。
--format=format¶
Change the default output format. This can be of a supported type like ‘json’
or a Go template.
Valid placeholders for the Go template are listed below:
更改默认输出格式。这可以是支持的类型,如'json'或 Go 模板。Go 模板的有效占位符如下所示:
Placeholder |
Description |
---|---|
.Created … .创建… |
Timestamp when the network was created |
.DNSEnabled |
Network has dns enabled (boolean) |
.Driver |
Network driver 网络驱动程序 |
.ID |
Network ID 网络标识 |
.Internal |
Network is internal (boolean) |
.IPAMOptions … |
Network ipam options 网络 IPAM 选项 |
.IPv6Enabled |
Network has ipv6 subnet (boolean) |
.Labels |
Network labels 网络标签 |
.Name |
Network name 网络名称 |
.NetworkDNSServers |
Array of DNS servers used in this network |
.NetworkInterface |
Name of the network interface on the host |
.Options … .选项... |
Network options 网络选项 |
.Routes |
List of static routes for this network |
.Subnets |
List of subnets on this network |
--no-trunc¶
Do not truncate the network ID.
不要截断网络 ID。
--noheading, -n¶ --noheading,-n ¶
Omit the table headings from the listing.
从列表中省略表头。
--quiet, -q¶
The quiet
option restricts the output to only the network names.
quiet
选项限制输出仅为网络名称。
EXAMPLE¶ 例子 ¶
Display networks: 显示网络:
$ podman network ls
NETWORK ID NAME DRIVER
88a7120ee19d podman bridge
6dd508dbf8cd podman6 bridge
8e35c2cd3bf6 podman5 macvlan
Display only network names:
仅显示网络名称:
$ podman network ls -q
podman
podman2
outside
podman9
Display name of network which support bridge plugin:
显示支持桥接插件的网络名称:
$ podman network ls --filter driver=bridge --format {{.Name}}
podman
podman2
podman9
List networks with their subnets:
列出网络及其子网:
$ podman network ls --format "{{.Name}}: {{range .Subnets}}{{.Subnet}} {{end}}"
podman: 10.88.0.0/16
podman3: 10.89.30.0/24 fde4:f86f:4aab:e68f::/64
macvlan:
SEE ALSO¶ 参见 ¶
podman(1), podman-network(1), podman-network-inspect(1), podman-network-create(1)
HISTORY¶ 历史 ¶
August 2021, Updated with the new network format by Paul Holzinger pholzing@redhat.com
2021 年 8 月,由 Paul Holzinger pholzing@redhat.com 更新了新的网络格式
August 2019, Originally compiled by Brent Baude bbaude@redhat.com
2019 年 8 月,最初由 Brent Baude bbaude@redhat.com 编译