Installation
The recommended way to use Rustinx. The image is built from scratch (no OS, no shell) and runs as a non-root user.
docker pull ghcr.io/shadowarcanist/rustinx:v1.0Image details:
- Base:
scratch(empty image, no OS packages) - User:
65534:65534(nobody) - Size: Under 2MB
- Port: 9090
Requires the Rust toolchain.
git clone https://github.com/shadowarcanist/rustinx.git
cd rustinx/app
cargo build --releaseThe release binary is at app/target/release/rustinx.
Build size optimizations
The release profile is already configured for minimal binary size:
[profile.release]
opt-level = "z" # Optimize for size
lto = true # Link-time optimization
codegen-units = 1 # Better optimization
panic = "abort" # Smaller binary
strip = true # Remove debug symbolsFrom the repository root:
docker build -t rustinx .This uses a multi-stage build:
- Builder stage: Compiles Rustinx with Alpine + musl for static linking
- Runtime stage: Copies the binary into a
scratchimage
CLI Usage
rustinx - ultra-lightweight static web server
Usage: rustinx [OPTIONS]
Options:
-c, --config <path> Config file (default: /etc/rustinx/rustinx.toml)
-v, --version Print version
-h, --help Print helpIf no config file is found at the default path, Rustinx starts with built-in defaults and serves files from /static.
