FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

NetCore-Technologies/boxr: A mini Docker engine built from Linux namespaces and cgroups. · GitHub

Repository files navigation

📦 boxr

A mini Docker engine built from scratch using Linux namespaces + cgroups.

No Docker. No containerd. Just raw syscalls.


What is boxr?

boxr is a lightweight container engine that does what Docker does under the hood — isolate processes using Linux namespaces and cgroups — but with zero dependencies and clean, readable code.

Built to learn. Built to use. Built to be understood.


Features

  • ✅ PID namespace isolation — container gets its own PID 1
  • ✅ UTS namespace — isolated hostname
  • ✅ Mount namespace — private filesystem view
  • ✅ IPC namespace — isolated interprocess communication
  • ✅ cgroup v2 — CPU and memory limits
  • 🔜 Network namespace + veth pair
  • 🔜 Overlay filesystem (image layers)
  • 🔜 Pull rootfs from Docker Hub registry API

Quick Start

# Linux only (requires root for namespace creation)
git clone https://github.com/manit6752025/boxr
cd boxr
go build -o boxr ./cmd/boxr
sudo ./boxr run /bin/sh

You're now inside an isolated container. No Docker installed.


How It Works

When you run boxr run /bin/sh, boxr:

  1. Forks a new process with CLONE_NEWPID — giving it PID 1
  2. Adds CLONE_NEWUTS — isolated hostname
  3. Adds CLONE_NEWNS — private mount namespace
  4. Adds CLONE_NEWIPC — isolated IPC
  5. Applies cgroup v2 limits for CPU and memory
  6. Exec's your command inside that isolated environment

No layers. No images. No daemon. Just a process that thinks it's alone.


Project Structure

boxr/ ├── cmd/boxr/main.go # CLI entry point ├── internal/ │ ├── container/ │ │ ├── run.go # Namespace isolation │ │ └── cgroup.go # cgroup v2 limits │ ├── image/ # (coming soon) registry pull │ └── fs/ # (coming soon) overlay filesystem ├── docs/ │ └── how-it-works.md # Deep dive explanation └── .github/workflows/release.yml # Cross-platform release pipeline


Why Not Just Use Docker?

You should use Docker in production. boxr exists to show you what's underneath — and to be a real, usable tool that doesn't need a 500MB daemon running to isolate a process.


Roadmap

  • v0.1 — Namespace + cgroup isolation, cross-platform releases
  • v0.2 — Network namespace, veth pair, internet inside container
  • v0.3 — Overlay filesystem, image layers
  • v0.4 — Pull and run Alpine from Docker Hub with no Docker

Contributing

PRs welcome. Open an issue first for big changes.


License

MIT — free to use, modify, sell, build on.


Built with 🔥 by manit6752025

About

A mini Docker engine built from Linux namespaces and cgroups.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages


Back | FazBrowse Home | New Git URL