Skip to content

feat: support overriding Docker image entrypoint - #15

Merged
Yunnglin merged 1 commit into
mainfrom
agent/add-docker-entrypoint-config
Aug 3, 2026
Merged

feat: support overriding Docker image entrypoint#15
Yunnglin merged 1 commit into
mainfrom
agent/add-docker-entrypoint-config

Conversation

@Yunnglin

@Yunnglin Yunnglin commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add an optional entrypoint field to DockerSandboxConfig
  • pass explicit overrides through to Docker, including [] to clear an image entrypoint
  • preserve existing inheritance when the field is unset

Validation

  • pytest -q tests/test_sandbox.py::TestSandboxBasicFunctionality::test_docker_entrypoint_override tests/test_sandbox.py::TestSandboxBasicFunctionality::test_docker_entrypoint_inherits_image_by_default
  • pre-commit run --files ms_enclave/sandbox/model/config.py ms_enclave/sandbox/boxes/docker_sandbox.py tests/test_sandbox.py

This is required for EvalScope to run the pinned OmniDocBench v1.6 image as a reusable sandbox pool without maintaining a derived image.

Copilot AI review requested due to automatic review settings August 3, 2026 09:26
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Ready to approve

The changes cleanly implement the requested entrypoint override semantics and include targeted tests for both explicit override and default inheritance behavior.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Pull request overview

This PR adds support for explicitly overriding a Docker image’s entrypoint via DockerSandboxConfig, including the ability to clear an image-defined entrypoint by passing an empty list, while preserving the existing “inherit from image” behavior when the field is unset.

Changes:

  • Added optional entrypoint: Optional[Union[str, List[str]]] to DockerSandboxConfig.
  • Updated DockerSandbox._create_container() to pass entrypoint through to docker-py only when explicitly set (including []).
  • Added tests verifying JSON round-tripping for entrypoint, explicit override behavior, and default inheritance behavior.
File summaries
File Description
tests/test_sandbox.py Adds coverage for entrypoint override/clearing and default inheritance behavior.
ms_enclave/sandbox/model/config.py Introduces the new entrypoint config field with documentation.
ms_enclave/sandbox/boxes/docker_sandbox.py Conditionally forwards entrypoint to container creation when not None (supports []).
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Lite

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

@Yunnglin
Yunnglin merged commit e3d9a0d into main Aug 3, 2026
2 checks passed
@Yunnglin
Yunnglin deleted the agent/add-docker-entrypoint-config branch August 3, 2026 09:33
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