Skip to content

fix(nemoclaw): remove USER sandbox two-stage build workaround - #35

Merged
LinoyBitan1 merged 1 commit into
validatedpatterns-sandbox:mainfrom
LinoyBitan1:remove-user-sandbox-workaround
Aug 23, 2026
Merged

fix(nemoclaw): remove USER sandbox two-stage build workaround#35
LinoyBitan1 merged 1 commit into
validatedpatterns-sandbox:mainfrom
LinoyBitan1:remove-user-sandbox-workaround

Conversation

@LinoyBitan1

Copy link
Copy Markdown
Collaborator

Summary

Remove the chained BuildConfig workaround that added USER sandbox and chown -R sandbox:sandbox /sandbox to the nemoclaw-sandbox image build.
The upstream fix (NemoClaw #7882 / NemoClaw #7890) has shipped in ghcr.io/nvidia/nemoclaw/sandbox-base:latest - the base image now defaults to USER sandbox with correct file ownership.

Jira: APPENG-5963

Background

NemoClaw's upstream Dockerfile previously defaulted to USER root at the end of the build, which caused OpenShift to reject the container (non-root UID enforcement). We implemented a two-stage chained BuildConfig as a workaround:

  1. nemoclaw-sandbox-root — builds from the upstream NemoClaw Dockerfile as-is (ends with USER root)
  2. nemoclaw-sandbox — layers chown -R sandbox:sandbox /sandbox + USER sandbox on top

With the upstream fix shipped, this workaround is no longer needed.

Changes

  • nemoclaw-imagestream/templates/buildconfig.yaml — collapsed two BuildConfigs into one. Removed the -root ImageStream, the chained FROM nemoclaw -sandbox-root:latest stage, and the RUN chown / USER sandbox layer. Added TARGETARCH build arg.
  • nemoclaw-imagestream/values.yaml — updated NemoClaw git ref from 15069f9 to 588bb6d (the old ref pointed to a Dockerfile that ended with USER root; the new ref includes the merged upstream fix #7890 that ends with USER sandbox). Added targetArch: "amd64" because the NemoClaw Dockerfile uses ARG TARGETARCH to compile platform-specific binaries — Docker multi-platform builds set this automatically, but OpenShift's BuildConfig does not, so it must be passed explicitly.
  • nemoclaw-cli-imagestream/values.yaml — updated NemoClaw git ref to the same 588bb6d commit to keep CLI and sandbox building from the same source.
  • Makefile-quickstart — removed nemoclaw-sandbox-root from ImageStream cleanup and removed the oc start-build nemoclaw-sandbox-root step. Only one build to trigger now.

Verification

  • Upstream base image has USER sandbox as default
  • make build-nemoclaw — single BuildConfig builds successfully
  • No Permission denied errors on sandbox create
  • Sandbox runs correctly — openshell sandbox create succeeds
  • TUI works — openclaw gateway starts, responds to prompts

@LinoyBitan1
LinoyBitan1 force-pushed the remove-user-sandbox-workaround branch from 1d23078 to 4a83623 Compare August 23, 2026 07:45
@LinoyBitan1

Copy link
Copy Markdown
Collaborator Author

@mtalvi Rebased on main, rebuilt, and retested successfully

@mtalvi mtalvi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@LinoyBitan1
LinoyBitan1 merged commit 4d2ec54 into validatedpatterns-sandbox:main Aug 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants