fix(build): correct docker build process for mobile sandbox#353
Merged
rayrayraykk merged 2 commits intoagentscope-ai:mainfrom Feb 6, 2026
Merged
fix(build): correct docker build process for mobile sandbox#353rayrayraykk merged 2 commits intoagentscope-ai:mainfrom
rayrayraykk merged 2 commits intoagentscope-ai:mainfrom
Conversation
rayrayraykk
reviewed
Jan 4, 2026
rayrayraykk
reviewed
Jan 4, 2026
Contributor
There was a problem hiding this comment.
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.
fb1adab to
e53e6b6
Compare
e53e6b6 to
fd06fda
Compare
rayrayraykk
approved these changes
Feb 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Correct docker build process for mobile sandbox