Sandbox version control system
Orca creates sandboxes from
- host's filesystem
- container (DockerHub)
and version control both host and container environment (by versioning entire filesystem with OverlayFS)
Read mechanism for more information.
Download orca from release page. Or execute below command to download command-line.
$ wget https://github.com/miyake13000/orca/releases/latest/download/orca
$ chmod +x ./orca
Orca needs root priviledge, so make orca available with sudo.
$ sudo mv ./orca /usr/bin/
Or, setuid to orca
$ sudo chmod 6755 ./orca
-
Initialize (once)
$ orca init # Use host envrionment
Or, you can use container image
$ orca init --image ubuntu:22.04 --name ubuntu-test
-
Run orca
# current files: example.c $ orca run # Enter sandbox $ apt update && apt install -y clang $ clang -o example example.c # current files: example example.c $ ./example $ exit # Exit from sandbox # current files: example.c
Or, you can use container image created orca init
$ orca --name ubuntu-test run $ apt update && apt install -y clang $ clang -o example example.c
-
Commit environment
$ orca commit --message "Install clang" $ orca log commit: 8dfb0a6c3c943d14ab4cf745d1c761cc6f386219 date: 2024-05-03 10:46:11.868560348 +09:00 message: Install clang
-
Create branch
$ orca branch libc $ orca checkout libc $ orca run bash -c "apt update && apt install -y 2.35-0ubuntu3" $ orca run gcc -o example example.com $ orca log commit: 408dfdc46bb489eafbf6e38acbeae7656d0c31ec date: 2024-05-03 10:49:25.145348653 +09:00 message: Downgrade libc commit: 8dfb0a6c3c943d14ab4cf745d1c761cc6f386219 date: 2024-05-03 10:46:11.868560348 +09:00 message: Install clang
-
Merge branch
$ orca checkout main $ orca merge libc $ orca log commit: 408dfdc46bb489eafbf6e38acbeae7656d0c31ec date: 2024-05-03 10:49:25.145348653 +09:00 message: Downgrade libc commit: 8dfb0a6c3c943d14ab4cf745d1c761cc6f386219 date: 2024-05-03 10:46:11.868560348 +09:00 message: Install clang
-
Reset commit
$ orca reset 8dfb0a $ orca log commit: 8dfb0a6c3c943d14ab4cf745d1c761cc6f386219 date: 2024-05-03 10:46:11.868560348 +09:00 message: Install clang
sudo rm $(which orca)
sudo rm -rf $HOME/.local/share/orca
- Install Rust
- Build orca
$ cargo build --release
- Orca is placed 'target/release/orca'
- Install 'x86_64-unknown-linux-musl' target
$ rustup target add x86_64-unknown-linux-musl
- Build orca
$ cargo build --release --target x86_64-unknown-linux-musl
- Orca is placed 'target/x86_64-unknown-linux-musl/release/orca'