fix(network): match service containers by exact name or dotted prefix on network lookup
This commit is contained in:
@@ -145,7 +145,7 @@ export class DockerNetwork extends DockerResource {
|
||||
public async getContainersOnNetworkForService(serviceArg: DockerService) {
|
||||
const containersOnNetwork = await this.listContainersOnNetwork();
|
||||
const containersOfService = containersOnNetwork.filter((container) => {
|
||||
return container.Name.startsWith(serviceArg.Spec.Name);
|
||||
return container.Name === serviceArg.Spec.Name || container.Name.startsWith(`${serviceArg.Spec.Name}.`);
|
||||
});
|
||||
return containersOfService;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user