diff --git a/packages/cli/generation/local-generation/docker-utils/src/runDocker.ts b/packages/cli/generation/local-generation/docker-utils/src/runDocker.ts index fd17a4c74db..66e5980c67e 100644 --- a/packages/cli/generation/local-generation/docker-utils/src/runDocker.ts +++ b/packages/cli/generation/local-generation/docker-utils/src/runDocker.ts @@ -1,5 +1,4 @@ import Docker from "dockerode"; -import os from "os"; import { Writable } from "stream"; export declare namespace runDocker { @@ -56,7 +55,7 @@ async function tryRunDocker({ }), { Binds: binds, - User: os.userInfo().uid.toString(), + User: "root", } ); diff --git a/packages/cli/generation/local-generation/local-workspace-runner/src/run-generator/runGenerator.ts b/packages/cli/generation/local-generation/local-workspace-runner/src/run-generator/runGenerator.ts index 5cca78a8e16..ad5334b54ed 100644 --- a/packages/cli/generation/local-generation/local-workspace-runner/src/run-generator/runGenerator.ts +++ b/packages/cli/generation/local-generation/local-workspace-runner/src/run-generator/runGenerator.ts @@ -1,14 +1,9 @@ import { AbsoluteFilePath } from "@fern-api/core-utils"; import { runDocker } from "@fern-api/docker-utils"; import { writeFile } from "fs/promises"; -import path from "path"; +import { DOCKER_CODEGEN_OUTPUT_DIRECTORY, DOCKER_GENERATOR_CONFIG_PATH, DOCKER_PATH_TO_IR } from "./constants"; import { getGeneratorConfig } from "./getGeneratorConfig"; -const DOCKER_FERN_DIRECTORY = "/fern"; -const DOCKER_CODEGEN_OUTPUT_DIRECTORY = path.join(DOCKER_FERN_DIRECTORY, "output"); -const DOCKER_GENERATOR_CONFIG_PATH = path.join(DOCKER_FERN_DIRECTORY, "config.json"); -const DOCKER_PATH_TO_IR = path.join(DOCKER_FERN_DIRECTORY, "ir.json"); - export declare namespace runGenerator { export interface Args { imageName: string;