/ruri

chroot/unshare Linux containers, simple & secure 🍥

Primary LanguageCMIT LicenseMIT

「 须臾水面明月出,沧江万顷瑠璃寒 」


中文文档

ruri官方文档

WARNING:

* Your warranty is void.
* I am not responsible for anything that may happen to your device by using this program.
* You do it at your own risk and take the responsibility upon yourself.
* This program has no Super Cow Powers.

Warning

ruri should always be executed with root privileges(sudo), and do not set SUID or any capability on it!

Bug reporting:

“Bugs will happen, if they don’t happen in hardware, they will happen in software and if they don’t happen in your software and they will happen in somebody else’s software.”
--Torvalds

If you think something does not work as expected, please Open a new isssue

About:

 ruri is pronounced as luli, or you can call it 瑠璃 in Chinese or Japanese as well.
 ruri is the romaji acronym of Lightweight, User-friendly Linux-container Implementation. It's designed to provide better security for Linux containers on devices that do not support docker.

  • Simple:
    The basic usage is very very simple, you can use it just like the command chroot.
  • Secure:
    It uses libcap and libseccomp for security, with other protections.
  • Run Everywhere:
    Build ruri with ./configure -s, it will be compiled as a small binary file(~1M), but it can be run anywhere without dependent libraries.

Install:

git clone https://github.com/Moe-hacker/ruri
cd ruri
./configure
make
sudo cp ruri /usr/bin/ruri

Build options:

Usage: ./configure [OPTION]...
    -h, --help          show help
    -s, --static        compile static binary
    -d, --dev           compile dev version

Usage:

See ruri -h

Quick start(with rootfstool):

Download and unpack a rootfs:

git clone https://github.com/Moe-hacker/rootfstool
cd rootfstool
./rootfstool download -d alpine -v edge
mkdir /tmp/alpine
sudo tar -xvf rootfs.tar.xz -C /tmp/alpine

Then:

sudo ruri /tmp/alpine

For unshare container:

sudo ruri -u /tmp/alpine

Very simple as you can see.
For command line examples, please see ruri -H.

FAQ:

FAQ

License:

License of code:

  • Licensed under the MIT License
  • Copyright (c) 2022-2024 Moe-hacker

License of clang-format config file:

  • GPL-2.0

「 咲誇る花 美しく、

散り行く運命 知りながら、

僅かな時の彩を 」

(>_×)