(port: number, logFile?: string)
| 133 | * container. The volume stays — it's the deployment's persistent data. |
| 134 | */ |
| 135 | export const stopSelfhostContainer = async (port: number, logFile?: string): Promise<void> => { |
| 136 | const name = selfhostDockerContainerName(port); |
| 137 | await exec("docker", ["stop", name]).catch(() => {}); |
| 138 | if (logFile) { |
| 139 | const { stdout } = await exec("docker", ["logs", name]).catch(() => ({ stdout: "" })); |
| 140 | if (stdout) appendFileSync(logFile, stdout); |
| 141 | } |
| 142 | await exec("docker", ["rm", "-f", name]).catch(() => {}); |
| 143 | }; |
| 144 | |
| 145 | export const bootSelfhostDocker = async ( |
| 146 | options: SelfhostDockerBootOptions, |
no test coverage detected