Difficulty: Beginner · You'll need: TypeScript, React · Size: ~15 lines
What's going on
apps/web/src/components/ContainerTable.tsx:280 turns the published port into a link:
<Link target="_blank" to={`http://localhost:${container.ports[0]?.PublicPort}`}>
The hostname is hardcoded to localhost.
Why it matters
DockSight exists to manage containers on remote hosts — that is the entire premise of the outbound-agent design. A container on a data-centre host publishing :8080 renders a link to http://localhost:8080, which either 404s or, worse, opens something unrelated running on the operator's own machine.
The link is only correct in the single case where the operator is browsing the dashboard from the same machine the container runs on.
Additional problems in the same expression
ports[0] silently picks the first mapping. A container publishing three ports shows one link with no indication the others exist.
- The scheme is hardcoded to
http://, so an HTTPS service gets a broken link.
PublicPort is empty for containers that expose a port without publishing it, producing http://localhost:.
Things to work out
The dashboard does not currently know a host's reachable address. HostCard and the hosts API expose hostname, but that is the machine's own hostname as reported by the agent, which is not necessarily resolvable or routable from the operator's browser.
Options, roughly in order of effort:
- Drop the link. Render the port text only. Honest, and strictly better than a wrong link.
- Link only when the host is reachable. Requires the platform to know a browsable address per host — a new field operators set, since it cannot be inferred.
- Show all mappings. A small popover listing every published port, linked where a host address is known.
Option 1 is a safe immediate fix; 2 and 3 need a decision on where a host address comes from.
Done when
Difficulty: Beginner · You'll need: TypeScript, React · Size: ~15 lines
What's going on
apps/web/src/components/ContainerTable.tsx:280turns the published port into a link:The hostname is hardcoded to
localhost.Why it matters
DockSight exists to manage containers on remote hosts — that is the entire premise of the outbound-agent design. A container on a data-centre host publishing
:8080renders a link tohttp://localhost:8080, which either 404s or, worse, opens something unrelated running on the operator's own machine.The link is only correct in the single case where the operator is browsing the dashboard from the same machine the container runs on.
Additional problems in the same expression
ports[0]silently picks the first mapping. A container publishing three ports shows one link with no indication the others exist.http://, so an HTTPS service gets a broken link.PublicPortis empty for containers that expose a port without publishing it, producinghttp://localhost:.Things to work out
The dashboard does not currently know a host's reachable address.
HostCardand the hosts API exposehostname, but that is the machine's own hostname as reported by the agent, which is not necessarily resolvable or routable from the operator's browser.Options, roughly in order of effort:
Option 1 is a safe immediate fix; 2 and 3 need a decision on where a host address comes from.
Done when
localhostfor a container on a remote host