No description
- Rust 96.3%
- Dockerfile 3.7%
|
All checks were successful
Docker check and push / release (push) Successful in 2m51s
|
||
|---|---|---|
| .cargo | ||
| .forgejo/workflows | ||
| src | ||
| tests | ||
| .dockerignore | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| Dockerfile | ||
| LICENSE | ||
| README.md | ||
| renovate.json | ||
| uinitrs.example.json | ||
uinitrs
Extracts a .tar.zst archive into a target directory. Designed to run early in
a Linux init sequence — no shell, no dynamic libraries, no external tools.
Environment variables
| Variable | Description |
|---|---|
SRC_PATH |
Path to the .tar.zst archive to extract |
DEST_PATH |
Destination directory to extract into |
Process manager config
Place a uinitrs.json file at the root of the archive. If absent, uinitrs
exits after extraction with no error.
Example config:
{
"services": [
{
"name": "web",
"binary": "/usr/bin/nginx",
"args": ["-g", "daemon off;"],
"working_dir": "/var/www",
"uid": 33,
"gid": 33
},
...
]
}
| Field | Required | Description |
|---|---|---|
binary |
yes | Absolute path to the executable |
working_dir |
yes | Working directory the process is started in |
uid |
yes | UID the process runs as |
gid |
yes | GID the process runs as |
name |
no | Label used in log output (defaults to binary) |
args |
no | Arguments passed to the executable (default []) |
Each service is supervised independently: if it exits for any reason it is restarted immediately.
Building a static binary
Install the musl target and toolchain for your architecture (Arch Linux):
# x86-64
sudo pacman -S rust-musl musl
# AArch64
sudo pacman -S rust-aarch64-musl musl-aarch64
Then build, passing the target for your architecture:
cargo build --release --target x86_64-unknown-linux-musl # x86-64
cargo build --release --target aarch64-unknown-linux-musl # AArch64
Or let the shell pick the right target automatically:
cargo build --release --target "$(uname -m)-unknown-linux-musl"
The resulting binary is fully statically linked with no external runtime dependencies.
Running tests
cargo test