mirror of
https://github.com/docker/cli.git
synced 2026-09-24 07:25:07 -05:00
Include container names in network inspect
This commit makes `docker network inspect` print container names as service discovery is based on container name. Signed-off-by: Zhang Wei <zhangwei555@huawei.com> Upstream-commit: fbed26297dca2adc59d891c661548302ec848984 Component: engine
This commit is contained in:
@@ -237,6 +237,7 @@ func buildEndpointResource(e libnetwork.Endpoint) types.EndpointResource {
|
||||
}
|
||||
|
||||
er.EndpointID = e.ID()
|
||||
er.Name = e.Name()
|
||||
ei := e.Info()
|
||||
if ei == nil {
|
||||
return er
|
||||
|
||||
@@ -361,6 +361,7 @@ type NetworkResource struct {
|
||||
|
||||
// EndpointResource contains network resources allocated and used for a container in a network
|
||||
type EndpointResource struct {
|
||||
Name string
|
||||
EndpointID string
|
||||
MacAddress string
|
||||
IPv4Address string
|
||||
|
||||
Reference in New Issue
Block a user