MCPcopy
hub / github.com/simstudioai/sim / stopAndRemoveContainer

Function stopAndRemoveContainer

packages/cli/src/index.ts:68–75  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

66}
67
68async function stopAndRemoveContainer(name: string): Promise<void> {
69 try {
70 execSync(`docker stop ${name} 2>/dev/null || true`)
71 execSync(`docker rm ${name} 2>/dev/null || true`)
72 } catch (_error) {
73 // Ignore errors, container might not exist
74 }
75}
76
77async function cleanupExistingContainers(): Promise<void> {
78 console.log(chalk.blue('🧹 Cleaning up any existing containers...'))

Callers 2

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected