This repository contains the backend scripts and configuration used to manage Docker-based code execution and testing for the CodeLighthouse platform — a real-time code feedback and assignment system developed for my Bachelor's thesis.
The core goal of this component is to safely execute user-submitted code inside Docker containers, run predefined test cases, and return meaningful feedback — all isolated from the host system.
- Takes user code submissions (e.g., Python scripts)
- Wraps the submission into a temporary file
- Spins up a preconfigured Docker container with appropriate language/runtime
- Mounts the code and test environment
- Executes the code with custom test cases (e.g., via
pytestor shell scripts) - Captures stdout/stderr and returns it to the frontend as feedback
- Python
- Docker / Docker CLI
- Subprocess / OS modules
- Shell scripting
-
Build the Docker container:
docker build -t codelighthouse-executor ./docker
-
Submit code for testing (example wrapper):
python run_code.py --code "print('Hello World')" --language python -
Output will include:
- Standard output from the code
- Any test results or feedback messages
Part of the academic deliverables for my undergraduate thesis. Open to educational use.
Ștefan Secrieru
GitHub: @Stefan3002
Thesis: CodeLighthouse - Automated Online Assessments Platform