Sandboxed compiles: cwd argument was added to CommandRunner

see upstream commit ce6f9b8
This commit is contained in:
yu-i-i
2026-05-19 17:40:12 +02:00
parent aa9c845ac6
commit d41f1cfed1

View File

@@ -26,6 +26,7 @@ const DockerRunner = {
timeout, timeout,
environment, environment,
compileGroup, compileGroup,
cwd,
callback callback
) { ) {
command = command.map(arg => command = command.map(arg =>
@@ -82,7 +83,8 @@ const DockerRunner = {
volumes, volumes,
timeout, timeout,
environment, environment,
compileGroup compileGroup,
cwd
) )
const fingerprint = DockerRunner._fingerprintContainer(options) const fingerprint = DockerRunner._fingerprintContainer(options)
const name = `project-${projectId}-${fingerprint}` const name = `project-${projectId}-${fingerprint}`
@@ -217,7 +219,8 @@ const DockerRunner = {
volumes, volumes,
timeout, timeout,
environment, environment,
compileGroup compileGroup,
cwd
) { ) {
const timeoutInSeconds = timeout / 1000 const timeoutInSeconds = timeout / 1000
@@ -245,7 +248,9 @@ const DockerRunner = {
const options = { const options = {
Cmd: command, Cmd: command,
Image: image, Image: image,
WorkingDir: '/compile', WorkingDir: cwd
? Path.posix.join('/compile', cwd)
: '/compile',
NetworkDisabled: true, NetworkDisabled: true,
Memory: 1024 * 1024 * 1024 * 1024, // 1 Gb Memory: 1024 * 1024 * 1024 * 1024, // 1 Gb
User: Settings.clsi.docker.user, User: Settings.clsi.docker.user,