Merge pull request #20738 from akz08/add-docker-useroptions-bypass

Add a way to bypass user modification for TechDocs CLI docs generation in Docker
This commit is contained in:
Patrik Oldsberg
2023-11-20 17:41:14 +01:00
committed by GitHub
11 changed files with 23 additions and 1 deletions
@@ -97,6 +97,7 @@ export class TechdocsGenerator implements GeneratorBase {
logger: childLogger,
logStream,
siteOptions,
runAsDefaultUser,
} = options;
// Do some updates to mkdocs.yml before generating docs e.g. adding repo_url
@@ -171,6 +172,7 @@ export class TechdocsGenerator implements GeneratorBase {
// write to, otherwise they will just fail trying to write to /
envVars: { HOME: '/tmp' },
pullImage: this.options.pullImage,
defaultUser: runAsDefaultUser,
});
childLogger.info(
`Successfully generated docs from ${inputDir} into ${outputDir} using techdocs-container`,
@@ -64,6 +64,7 @@ export type GeneratorRunOptions = {
logger: Logger;
logStream?: Writable;
siteOptions?: { name?: string };
runAsDefaultUser?: boolean;
};
/**