mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-25 08:31:03 +00:00
properly display unforwarded port
This commit is contained in:
parent
15990effff
commit
2f52bd04e6
1 changed files with 4 additions and 0 deletions
|
|
@ -57,6 +57,10 @@ func (c *Container) GetDisplayStrings(isFocused bool) []string {
|
||||||
|
|
||||||
func (c *Container) displayPorts() string {
|
func (c *Container) displayPorts() string {
|
||||||
portStrings := lo.Map(c.Container.Ports, func(port types.Port, _ int) string {
|
portStrings := lo.Map(c.Container.Ports, func(port types.Port, _ int) string {
|
||||||
|
if port.PublicPort == 0 {
|
||||||
|
return fmt.Sprintf("%d\\%s", port.PrivatePort, port.Type)
|
||||||
|
}
|
||||||
|
|
||||||
// docker ps will show '0.0.0.0:80->80/tcp' but we'll show
|
// docker ps will show '0.0.0.0:80->80/tcp' but we'll show
|
||||||
// '80->80/tcp' instead to save space (unless the IP is something other than
|
// '80->80/tcp' instead to save space (unless the IP is something other than
|
||||||
// 0.0.0.0)
|
// 0.0.0.0)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue