scorpiox-unsharecontainer

Linux x64 Linux ARM64

Description

scorpiox-unshare is a rootless container runtime that leverages Linux user namespaces to create isolated execution environments without requiring root privileges. It sets up PID, mount, network, and user namespace isolation, enabling secure sandboxed process execution. Built as a lightweight alternative to full container runtimes, it provides fast startup and minimal overhead for CLI workloads.

⚙️ Flags & Options (3)

Flag Short Description Takes Value
--verbose Enable verbose output with detailed namespace setup and teardown logging No
--perf Enable performance timing for namespace creation, process execution, and cleanup phases No
--no-perf Disable performance timing output (overrides default if perf is enabled globally) No

💻 Usage Examples

# Run an isolated shell in a new user namespace $ scorpiox-unshare /bin/sh sh-5.1$ id uid=0(root) gid=0(root) sh-5.1$ hostname scorpiox-sandbox
# Run a build command in an isolated namespace with verbose output $ scorpiox-unshare --verbose make -C /workspace/myproject [unshare] creating user namespace... [unshare] mapping uid 1000 → 0 [unshare] mounting proc at /proc [unshare] creating PID namespace... [unshare] exec: make -C /workspace/myproject make: Entering directory '/workspace/myproject' ...
# Measure namespace creation and teardown performance $ scorpiox-unshare --perf ls / bin boot dev etc home lib ... [perf] namespace_create: 0.42ms [perf] process_exec: 1.87ms [perf] cleanup: 0.15ms [perf] total: 2.44ms
# Run a network-isolated process (no external access) $ scorpiox-unshare curl https://example.com curl: (6) Could not resolve host: example.com
# Execute a test suite in a clean namespace with perf disabled $ scorpiox-unshare --no-perf ./run-tests.sh Running 42 tests... All tests passed.
# Chain with other ScorpioX tools for sandboxed agent execution $ scorpiox-unshare scorpiox-bash -c "scorpiox-agent run task.yaml"

📦 Source & Build Info

Source File
scorpiox/scorpiox-unshare.c
Lines of Code
2,714
Dependencies
None

🔗 Related Tools