RustinxRustinx

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.0

Image 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 --release

The release binary is at app/target/release/rustinx.

Build size optimizations

The release profile is already configured for minimal binary size:

Cargo.toml
[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 symbols

From the repository root:

docker build -t rustinx .

This uses a multi-stage build:

  1. Builder stage: Compiles Rustinx with Alpine + musl for static linking
  2. Runtime stage: Copies the binary into a scratch image

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 help

If no config file is found at the default path, Rustinx starts with built-in defaults and serves files from /static.

On this page