Skip to content

fix(build): correct docker build process for mobile sandbox#353

Merged
rayrayraykk merged 2 commits intoagentscope-ai:mainfrom
XiuShenAl:fix/mobile-sandbox-build
Feb 6, 2026
Merged

fix(build): correct docker build process for mobile sandbox#353
rayrayraykk merged 2 commits intoagentscope-ai:mainfrom
XiuShenAl:fix/mobile-sandbox-build

Conversation

@XiuShenAl
Copy link
Copy Markdown
Collaborator

Description

Correct docker build process for mobile sandbox

@XiuShenAl XiuShenAl requested a review from a team December 25, 2025 02:19
Comment thread .github/workflows/build_sandbox_image.yml
Comment thread src/agentscope_runtime/sandbox/build.py
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the Docker build process for the mobile sandbox to avoid Docker-in-Docker (DinD) during the image build phase. Instead of pulling the Redroid image inside the Dockerfile, the build script now prepares the Redroid image externally and copies it into the build context as a tarball.

Key changes:

  • Extracts Redroid image preparation from Dockerfile to Python build script
  • Consolidates host environment checking into a dedicated module
  • Implements a two-phase container startup (health check vs normal mode) to preserve the Redroid tarball during image commit

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
src/agentscope_runtime/sandbox/build.py Adds prepare_redroid_image function to pull and save Redroid image externally; integrates host readiness checks for mobile builds; modifies build_image to handle mobile-specific requirements
src/agentscope_runtime/sandbox/box/mobile/mobile_sandbox.py Removes duplicate host checking code and delegates to new host_checker module
src/agentscope_runtime/sandbox/box/mobile/box/host_checker.py New module consolidating host environment validation logic previously embedded in mobile_sandbox.py
src/agentscope_runtime/sandbox/box/mobile/box/scripts/start.sh Adds run-mode detection to conditionally preserve redroid.tar during health checks; verifies Redroid image is loaded
src/agentscope_runtime/sandbox/box/mobile/Dockerfile Removes redroid-fetcher stage that used DinD; copies redroid.tar from build context instead
.github/workflows/build_sandbox_image.yml Adds step to load Android kernel modules before build

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/agentscope_runtime/sandbox/box/mobile/box/host_checker.py
Comment thread src/agentscope_runtime/sandbox/build.py
Comment thread src/agentscope_runtime/sandbox/build.py
Comment thread src/agentscope_runtime/sandbox/build.py
Comment thread src/agentscope_runtime/sandbox/build.py Outdated
Comment thread src/agentscope_runtime/sandbox/build.py Outdated
Comment thread src/agentscope_runtime/sandbox/build.py Outdated
Comment thread src/agentscope_runtime/sandbox/build.py
Comment thread src/agentscope_runtime/sandbox/box/mobile/box/scripts/start.sh
Comment thread src/agentscope_runtime/sandbox/build.py Outdated
@XiuShenAl XiuShenAl force-pushed the fix/mobile-sandbox-build branch 2 times, most recently from fb1adab to e53e6b6 Compare January 15, 2026 09:53
@XiuShenAl XiuShenAl force-pushed the fix/mobile-sandbox-build branch from e53e6b6 to fd06fda Compare February 5, 2026 11:39
@rayrayraykk rayrayraykk merged commit 3265db9 into agentscope-ai:main Feb 6, 2026
7 checks passed
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.

3 participants