mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-17 18:51:14 +01:00
🐛 Fix port in Service URL for Docker Module
This commit is contained in:
@@ -24,12 +24,12 @@ export function tryMatchService(container: Dockerode.ContainerInfo | undefined)
|
||||
if (container === undefined) return {};
|
||||
const name = container.Names[0].substring(1);
|
||||
const type = tryMatchType(container.Image);
|
||||
const port = tryMatchPort(type.toLowerCase());
|
||||
const port = tryMatchPort(type.toLowerCase())?.value ?? container.Ports[0]?.PublicPort;
|
||||
return {
|
||||
name,
|
||||
id: container.Id,
|
||||
type: tryMatchType(container.Image),
|
||||
url: `localhost${port ? `:${port.value}` : ''}`,
|
||||
url: `localhost${port ? `:${port}` : ''}`,
|
||||
icon: `https://cdn.jsdelivr.net/gh/walkxhub/dashboard-icons/png/${name
|
||||
.replace(/\s+/g, '-')
|
||||
.toLowerCase()}.png`,
|
||||
|
||||
Reference in New Issue
Block a user