Build Local

This page builds the light-deployer binary and container image from the Light Fabric workspace.

Run all commands from the repository root:

cd ~/workspace/light-fabric

Rust Build

Use cargo check first for a quick compile validation:

cargo check -p light-deployer

Run the deployer tests:

cargo test -p light-deployer

Build a debug binary:

cargo build -p light-deployer

Build a release binary:

cargo build --release -p light-deployer

The release binary is written to:

target/release/light-deployer

Docker Image

Build the local image:

./apps/light-deployer/build.sh latest

The default image name is:

networknt/light-deployer:latest

To override the image name:

IMAGE=localhost:32000/light-deployer:latest ./apps/light-deployer/build.sh latest

Verify the image exists:

docker image inspect networknt/light-deployer:latest

What The Image Contains

The Dockerfile copies:

  • /usr/local/bin/light-deployer
  • /app/config

The container runs from /app, so the default runtime config directory is:

/app/config

The default HTTP port is 7088, configured in:

apps/light-deployer/config/server.yml

Expected Result

Before moving on, these commands should pass:

cargo check -p light-deployer
cargo test -p light-deployer
./apps/light-deployer/build.sh latest
docker image inspect networknt/light-deployer:latest