MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / resolveImage

Function resolveImage

e2e/setup/selfhost-docker.boot.ts:55–69  ·  view source on GitHub ↗
(logFile?: string)

Source from the content-addressed store, hash-verified

53 * testing what users deploy instead of a dev server.
54 */
55const 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
71export interface RunContainerOptions {
72 readonly image: string;

Callers 1

bootSelfhostDockerFunction · 0.85

Calls 1

logFunction · 0.70

Tested by

no test coverage detected