fix: harden docker smoke packaging

This commit is contained in:
Peter Steinberger
2026-04-11 14:40:01 +01:00
parent ccfc97c235
commit 24a5ba732f
3 changed files with 40 additions and 2 deletions

View File

@@ -54,13 +54,21 @@ openclaw_live_stage_state_dir() {
# Sandbox workspaces can accumulate root-owned artifacts from prior Docker
# runs. They are not needed for live-test auth/config staging and can make
# temp-dir cleanup fail on exit, so keep them out of the staged state copy.
set +e
tar -C "$source_dir" \
--warning=no-file-changed \
--ignore-failed-read \
--exclude=workspace \
--exclude=sandboxes \
--exclude=relay.sock \
--exclude='*.sock' \
--exclude='*/*.sock' \
-cf - . | tar -C "$dest_dir" -xf -
local status=$?
set -e
if [ "$status" -gt 1 ]; then
return "$status"
fi
chmod -R u+rwX "$dest_dir" || true
if [ -d "$source_dir/workspace" ] && [ ! -e "$dest_dir/workspace" ]; then
ln -s "$source_dir/workspace" "$dest_dir/workspace"