Description:Currently, DockPorts only displays ports of running containers.When a container stops, its mapped port disappears from the page.
This causes a hidden risk:The stopped container still retains port binding configuration. If we deploy a new container and reuse this port, port conflict will occur when the old container restarts.
Solution suggestion:
Read all containers (including stopped/exited) via Docker API.
Identify ports pre-bound by stopped containers.
Add a distinguishable status mark for these occupied-but-unused ports on the page.
This can effectively avoid duplicate port allocation and conflict problems.
Description:Currently, DockPorts only displays ports of running containers.When a container stops, its mapped port disappears from the page.
This causes a hidden risk:The stopped container still retains port binding configuration. If we deploy a new container and reuse this port, port conflict will occur when the old container restarts.
Solution suggestion:
Read all containers (including stopped/exited) via Docker API.
Identify ports pre-bound by stopped containers.
Add a distinguishable status mark for these occupied-but-unused ports on the page.
This can effectively avoid duplicate port allocation and conflict problems.