feat(scaffolder): use the uid and gid of the parent process for docker

This commit is contained in:
blam
2020-08-10 18:56:39 +02:00
parent aab8058136
commit d615211c70
@@ -71,6 +71,9 @@ export const runDockerContainer = async ({
return undefined;
});
});
const User = `${process.getuid()}:${process.getgid()}`;
const [{ Error: error, StatusCode: statusCode }] = await dockerClient.run(
imageName,
args,
@@ -85,6 +88,7 @@ export const runDockerContainer = async ({
`${await fs.promises.realpath(templateDir)}:/template`,
],
},
User,
...createOptions,
},
);