Skip to content

Commit

Permalink
Run local docker as root (#781)
Browse files Browse the repository at this point in the history
  • Loading branch information
zachkirsch authored Oct 2, 2022
1 parent 2ac016c commit 46ff8fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Docker from "dockerode";
import os from "os";
import { Writable } from "stream";

export declare namespace runDocker {
Expand Down Expand Up @@ -56,7 +55,7 @@ async function tryRunDocker({
}),
{
Binds: binds,
User: os.userInfo().uid.toString(),
User: "root",
}
);

Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit 46ff8fb

Please sign in to comment.