Skip to content

[Feature]: Docker-based Code Execution Sandbox #2280

Description

@Vachhani-Tapan

Feature/Project Proposal

I would like to propose a secure, isolated code execution sandbox that allows users to compile and run their code directly within the browser while practicing for technical coding interviews.

Problem Statement

Currently, users can only write code in a static editor during their technical prep. Without the ability to run their code, test against edge cases, or view stack traces, users cannot verify if their logic is actually correct, forcing them to leave the platform to use local IDEs or third-party compilers.

Proposed Solution

The project could build a CodeExecutionController that delegates raw user code to a DockerSandboxService. Using the Docker Engine SDK, the backend will spin up ephemeral, lightweight Alpine Linux containers. The code is mounted, executed with strict memory/CPU limits and a 5-second timeout, and the stdout/stderr logs are sanitized and streamed back to the frontend terminal UI.

Alternatives Considered

No response

Benefits

No response

Priority

None

Additional Context

No response

Checklist

  • I have searched existing issues and discussions before creating this request.
  • I am willing to work on this feature if it is approved.

Metadata

Metadata

Labels

claimedThis issue has been claimed by a contributorenhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions