(logFile?: string)
| 53 | * testing what users deploy instead of a dev server. |
| 54 | */ |
| 55 | const resolveImage = async (logFile?: string): Promise<string> => { |
| 56 | const pinned = process.env.E2E_SELFHOST_DOCKER_IMAGE; |
| 57 | if (pinned) return pinned; |
| 58 | const image = "executor-selfhost:e2e"; |
| 59 | log(logFile, `building ${image} from ${repoRoot}apps/host-selfhost/Dockerfile`); |
| 60 | await exec("docker", ["build", "-f", "apps/host-selfhost/Dockerfile", "-t", image, "."], { |
| 61 | cwd: repoRoot, |
| 62 | maxBuffer: 64 * 1024 * 1024, |
| 63 | }).catch((error: { stdout?: string; stderr?: string }) => { |
| 64 | log(logFile, String(error.stdout ?? "")); |
| 65 | log(logFile, String(error.stderr ?? "")); |
| 66 | throw new Error("selfhost-docker: image build failed — see log"); |
| 67 | }); |
| 68 | return image; |
| 69 | }; |
| 70 | |
| 71 | export interface RunContainerOptions { |
| 72 | readonly image: string; |
no test coverage detected