()
| 47 | } |
| 48 | |
| 49 | async function ensureNetworkExists(): Promise<boolean> { |
| 50 | try { |
| 51 | const networks = execSync('docker network ls --format "{{.Name}}"').toString() |
| 52 | if (!networks.includes(NETWORK_NAME)) { |
| 53 | console.log(chalk.blue(`🔄 Creating Docker network '${NETWORK_NAME}'...`)) |
| 54 | return await runCommand(['docker', 'network', 'create', NETWORK_NAME]) |
| 55 | } |
| 56 | return true |
| 57 | } catch (error) { |
| 58 | console.error('Failed to check networks:', error) |
| 59 | return false |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | async function pullImage(image: string): Promise<boolean> { |
| 64 | console.log(chalk.blue(`🔄 Pulling image ${image}...`)) |
no test coverage detected