-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
I've started working with localStack this week, after setting it up in a docker-compose file.
all the containers get a prefix name.
when I tried using the mcp, it couldn't find the running container.
after digging a bit and asking chat, it seems the issue is that the expected container name is hardcoded to be "localstack-main", and once I set the container name to that, the mcp had no issues.
file in question: src/lib/docker/docker.client.ts
async findLocalStackContainer(): Promise<string> {
const running = (await (this.docker.listContainers as any)({
filters: { status: ["running"] },
})) as Array<{ Id: string; Names?: string[] }>;
const match = (running || []).find((c) =>
(c.Names || []).some((n) => {
const name = (n || "").startsWith("/") ? n.slice(1) : n;
return name === "localstack-main";
})
);
if (match) return match.Id as string;
throw new Error("Could not find a running LocalStack container named 'localstack-main'.");
}this should be a configurable option.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels