Distrobox Boost
A container image builder tool for Open Container Initiative (distrobox/toolbox, also podman/docker).
Distrobox is good enough in running softwore, but compare to Package Manager such as APT, pacman, etc, it miss a faster, agile and Cloud Native way to use Open Container Initiative (OCI).
Table of Contents
Background
When I tried to use distrobox, it's not because of lacking packages, most users can package an app if they want, it's not that hard. I used distrobox as my build environment, such as building mono in RISC-V.
But as you know, the init for distrobox is too slow. I wasted a lot of time waiting for distrobox to tell me everything is ready. Sometimes distrobox init fails when the network is bad or wrong package name, etc.
So I decided to code this tool to save my time and help more users use distrobox and share their packages. Because I know many packages are only made for specific distros, and some distros like Gentoo, Void Linux, don't have many devs to package apps. I want to use this amazing distro as my host system, but also need some must-have apps.
Why I choice Rust but not bash:
- Easy write tests
- No runtime dependence issues
- faster!
The goals of this tool are:
- Build images the right way for distrobox.
- Run distrobox easily.
- Manage distrobox containers easily.
- Manage and share containers easily and properly.
- Update packages in containers quickly and easily.
- You tell me.
Install
From source
$ git clone [email protected]:xz-dev/distrobox-boost.git
$ cd distrobox-boost
$ cargo build --release
$ ls target/release/distrobox-boost
From OBS
From GitHub Release
TODO
From Docker Hub
TODO
Usage
Replace the builder of distrobox-assemble
-
You need an ini file for distrobox-assemble like tests/files/example.ini (more info in distrobox README)
-
Run command
$ target/release/distrobox-boost --input ./tests/files/example.ini --output ./tests/files/example_new.ini
-
distrobox-assemble
$ distrobox-assemble --file tests/files/example_new.ini create $ distrobox list
Build separate file for distrobox-assemble
-
You need an ini file for distrobox-assemble like tests/files/example.ini (more info in distrobox README)
-
Run command
$ target/release/distrobox-boost --input ./tests/files/example.ini --output-dir ./tests/files/example_out/
-
distrobox-assemble
$ distrobox-assemble --file tests/files/example/arch.ini create $ distrobox list
Create distrobox image by command
- Run the package like nix-shell
$ distrobox-boost fish -c 'ls -la'
- Run command in the package's container like nix-env
$ distrobox-boost fish --run bash -c "ls -la"
Pin/Unpin image to avoid clean
podman system prune -a and clean all your container data?
$ target/release/distrobox-boost --input ./tests/files/example.ini --pin
$ target/release/distrobox-boost --input ./tests/files/example.ini --unpin
$ target/release/distrobox-boost --input ./tests/files/example.ini --output ./tests/files/example_new.ini --pin # It also can use with other args
Roadmap
- Build image from Dockerfile
- Create distrobox image by command args
- Update packages in image
- Record packages in container
- Backup/Restore from disk for sharing your container
- Full tests
Contributing
Feel free to dive in! Open issues or PRs. Before you code, please discuss in issues first, because I may already be working on something without you knowing. I don't want to waste your time.