Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ RUN npm ci && npm run build
# hadolint ignore=DL3006
FROM ${BASE_IMAGE}

COPY scripts/install-provider-tools.sh /usr/local/lib/nemoclaw/install-provider-tools.sh

# Harden: remove unnecessary build tools and network probes from base image (#830)
# Protect runtime tools before autoremove — the GHCR base may predate the
# procps/e2fsprogs additions, leaving ps/chattr absent or auto-marked. The
Expand Down Expand Up @@ -57,6 +59,11 @@ RUN set -eu; \
ps --version; \
command -v chattr >/dev/null

# Provider tools are installed in the base image, but this derived-image replay
# keeps local and CI builds usable while GHCR sandbox-base catches up. OpenShell
# provider approval still controls network and credential use at runtime.
RUN chmod 755 /usr/local/lib/nemoclaw/install-provider-tools.sh \
&& /usr/local/lib/nemoclaw/install-provider-tools.sh

# Copy built plugin and blueprint into the sandbox
COPY --from=builder /opt/nemoclaw/dist/ /opt/nemoclaw/dist/
Expand Down Expand Up @@ -244,6 +251,8 @@ RUN chmod 755 /usr/local/bin/nemoclaw-start /usr/local/bin/nemoclaw-codex-acp \
/usr/local/lib/nemoclaw/generate-openclaw-config.py \
/usr/local/lib/nemoclaw/seed-wechat-accounts.py \
&& if [ -d /usr/local/lib/nemoclaw/preloads ]; then find /usr/local/lib/nemoclaw/preloads -type f -name '*.js' -exec chmod 644 {} +; fi \
&& mkdir -p /usr/local/share/nemoclaw/openclaw-plugins/nemoclaw \
&& cp -a /opt/nemoclaw/. /usr/local/share/nemoclaw/openclaw-plugins/nemoclaw/ \
&& chmod 755 /usr/local/share/nemoclaw \
/usr/local/share/nemoclaw/openclaw-plugins \
&& find /usr/local/share/nemoclaw/openclaw-plugins -type d -exec chmod 755 {} + \
Expand Down Expand Up @@ -621,7 +630,7 @@ RUN chown root:root /sandbox/.nemoclaw \
&& chmod -R 755 /sandbox/.nemoclaw/blueprints \
&& mkdir -p /sandbox/.nemoclaw/state /sandbox/.nemoclaw/migration /sandbox/.nemoclaw/snapshots /sandbox/.nemoclaw/staging \
&& chown sandbox:sandbox /sandbox/.nemoclaw/state /sandbox/.nemoclaw/migration /sandbox/.nemoclaw/snapshots /sandbox/.nemoclaw/staging \
&& touch /sandbox/.nemoclaw/config.json \
&& printf '{}\n' > /sandbox/.nemoclaw/config.json \
&& chown sandbox:sandbox /sandbox/.nemoclaw/config.json

# OpenShell 0.0.37's macOS VM backend currently remaps rootfs ownership to the
Expand Down
6 changes: 6 additions & 0 deletions Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,17 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
procps=2:4.0.4-9 \
e2fsprogs=1.47.2-3+b11 \
"dos2unix=7.5.2-1*" \
gh=2.46.0-3 \
glab=1.53.0-1+b3 \
jq=1.7.1-6+deb13u2 \
vim-tiny=2:9.1.1230-2 \
openssh-sftp-server=1:10.0p1-7+deb13u4 \
&& rm -rf /var/lib/apt/lists/*

COPY scripts/install-provider-tools.sh /usr/local/lib/nemoclaw/install-provider-tools.sh
RUN chmod 755 /usr/local/lib/nemoclaw/install-provider-tools.sh \
&& /usr/local/lib/nemoclaw/install-provider-tools.sh

# gosu for privilege separation (gateway vs sandbox user).
# Install from GitHub release with checksum verification instead of
# Debian's packaged gosu can lag upstream. Pinned to 1.19 (2025-09).
Expand Down
Loading
Loading