/usr/bin
All checks were successful
Build and Push Docker Images / build (src/LiquidCode.Tester.Gateway/Dockerfile, git.nullptr.top/liquidcode/liquidcode-tester-gateway-roman, gateway) (push) Successful in 53s
Build and Push Docker Images / build (src/LiquidCode.Tester.Worker/Dockerfile, git.nullptr.top/liquidcode/liquidcode-tester-worker-roman, worker) (push) Successful in 1m3s

This commit is contained in:
2025-11-05 22:47:00 +03:00
parent 0b29ce168e
commit 27581c4385

View File

@@ -160,8 +160,7 @@ public class CppCompilationServiceIsolate : ICompilationService
var stderrFilePath = Path.Combine(boxDir, "compile_stderr.txt"); var stderrFilePath = Path.Combine(boxDir, "compile_stderr.txt");
// Run compiler in Isolate // Run compiler in Isolate
// Note: Isolate by default provides access to /usr, /lib, etc. via --share-net=no // Bind the system toolchain directories read-only so the linker and headers remain reachable
// For compilation, we need access to system headers and libraries
var isolateResult = await _isolateService.RunAsync(new IsolateRunOptions var isolateResult = await _isolateService.RunAsync(new IsolateRunOptions
{ {
BoxId = boxId, BoxId = boxId,
@@ -178,6 +177,7 @@ public class CppCompilationServiceIsolate : ICompilationService
DirectoryBindings = new List<DirectoryBinding> DirectoryBindings = new List<DirectoryBinding>
{ {
new DirectoryBinding { HostPath = "/usr/include", SandboxPath = "/usr/include", ReadOnly = true }, new DirectoryBinding { HostPath = "/usr/include", SandboxPath = "/usr/include", ReadOnly = true },
new DirectoryBinding { HostPath = "/usr/bin", SandboxPath = "/usr/bin", ReadOnly = true },
new DirectoryBinding { HostPath = "/usr/lib", SandboxPath = "/usr/lib", ReadOnly = true }, new DirectoryBinding { HostPath = "/usr/lib", SandboxPath = "/usr/lib", ReadOnly = true },
new DirectoryBinding { HostPath = "/lib", SandboxPath = "/lib", ReadOnly = true } new DirectoryBinding { HostPath = "/lib", SandboxPath = "/lib", ReadOnly = true }
} }