Summary
Add a --from flag to nemoclaw sandbox create that provides a unified interface for specifying sandbox image sources. This replaces the current --image flag with a smarter option that accepts multiple input types and resolves them automatically.
Motivation
The nemoclaw-community repo hosts pre-built sandbox images (e.g., openclaw, sdg) published to GHCR. Currently, using these requires knowing the full image reference. The --from flag simplifies this to:
nemoclaw sandbox create --from openclaw
It also consolidates the two-step build+create workflow for custom Dockerfiles into a single command.
Proposed Behavior
--from accepts four input types, resolved in this order:
| Input | Example | Resolution |
|---|
| Dockerfile path | --from ./Dockerfile | Build + push to cluster + create sandbox |
| Directory with Dockerfile | --from ./my-sandbox/ | Build + push to cluster + create sandbox |
| Full image reference | --from myregistry.com/img:tag | Use directly as container image |
| Community sandbox name | --from openclaw | Resolve to ghcr.io/nvidia/nemoclaw-community/sandboxes/openclaw:latest |
Resolution heuristic
- If it's an existing file with "Dockerfile" in the name →
Dockerfile mode - If it's an existing directory containing a
Dockerfile → Dockerfile mode (context = directory) - If it contains
/, :, or . → full image reference - Otherwise → community sandbox name, resolved to
{NEMOCLAW_COMMUNITY_REGISTRY}/{name}:latest
The community registry prefix defaults to ghcr.io/nvidia/nemoclaw-community/sandboxes and is overridable via NEMOCLAW_COMMUNITY_REGISTRY env var.
Policy handling
Policy remains separate — --from only resolves the image. Community sandbox images bake their policy into /etc/navigator/policy.yaml at build time. Users can still override with --policy.
Files to Change
crates/navigator-cli/src/main.rs — Replace --image with --from in SandboxCommands::Createcrates/navigator-cli/src/run.rs — Add resolve_from() helper, update sandbox_create() and sandbox_create_with_bootstrap() signatures, integrate build+push for Dockerfile sourcese2e/bash/test_sandbox_custom_image.sh — Update --image → --fromarchitecture/sandbox-custom-containers.md — Document new --from flag and resolution modes
Acceptance Criteria
Summary
Add a
--fromflag tonemoclaw sandbox createthat provides a unified interface for specifying sandbox image sources. This replaces the current--imageflag with a smarter option that accepts multiple input types and resolves them automatically.Motivation
The
nemoclaw-communityrepo hosts pre-built sandbox images (e.g.,openclaw,sdg) published to GHCR. Currently, using these requires knowing the full image reference. The--fromflag simplifies this to:It also consolidates the two-step build+create workflow for custom Dockerfiles into a single command.
Proposed Behavior
--fromaccepts four input types, resolved in this order:--from ./Dockerfile--from ./my-sandbox/--from myregistry.com/img:tag--from openclawghcr.io/nvidia/nemoclaw-community/sandboxes/openclaw:latestResolution heuristic
DockerfilemodeDockerfile→Dockerfilemode (context = directory)/,:, or.→ full image reference{NEMOCLAW_COMMUNITY_REGISTRY}/{name}:latestThe community registry prefix defaults to
ghcr.io/nvidia/nemoclaw-community/sandboxesand is overridable viaNEMOCLAW_COMMUNITY_REGISTRYenv var.Policy handling
Policy remains separate —
--fromonly resolves the image. Community sandbox images bake their policy into/etc/navigator/policy.yamlat build time. Users can still override with--policy.Files to Change
crates/navigator-cli/src/main.rs— Replace--imagewith--frominSandboxCommands::Createcrates/navigator-cli/src/run.rs— Addresolve_from()helper, updatesandbox_create()andsandbox_create_with_bootstrap()signatures, integrate build+push for Dockerfile sourcese2e/bash/test_sandbox_custom_image.sh— Update--image→--fromarchitecture/sandbox-custom-containers.md— Document new--fromflag and resolution modesAcceptance Criteria
ncl sandbox create --from openclawresolves to the community GHCR image and creates a sandboxncl sandbox create --from ./Dockerfilebuilds, pushes, and creates in one stepncl sandbox create --from ./my-sandbox/builds from directory contextncl sandbox create --from myregistry.com/myimage:tagworks like the old--image--imageflag is removed (replaced entirely by--from)--from+--policycan be combinedNEMOCLAW_COMMUNITY_REGISTRYenv var overrides the default community prefix