Skip to content

feat(sdk): add Image.from_dockerfile() support#2

Open
Issac-Newton wants to merge 2 commits into
feature/acr-image-configfrom
feature/start-from-dockerfile
Open

feat(sdk): add Image.from_dockerfile() support#2
Issac-Newton wants to merge 2 commits into
feature/acr-image-configfrom
feature/start-from-dockerfile

Conversation

@Issac-Newton

@Issac-Newton Issac-Newton commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add Image.from_dockerfile() SDK method to start sandboxes from a local Dockerfile, including content-hash-based tagging, build/push via a remote builder sandbox, and cache-hit detection
  • SDK fetches backend config from admin GET /client_config endpoint at Sandbox.start() time — registry URL, namespace, temporary ACR credentials, and builder settings
  • Explicit user-provided ImageRegistry / BuilderConfig values still override admin defaults

Depends on: alibaba#1101

refs alibaba#1101

Test plan

  • Unit tests for Image name resolution, content hashing, admin config fill, explicit override
  • Integration tests for build-and-start, cache skip, content-change rebuild
  • uv run pytest tests/unit/sdk/sandbox/test_image.py -v — 10 tests pass

🤖 Generated with Claude Code

@Issac-Newton Issac-Newton force-pushed the feature/acr-image-config branch from 423985d to 8acab08 Compare June 12, 2026 09:01
@Issac-Newton Issac-Newton force-pushed the feature/start-from-dockerfile branch from 599c157 to 7a6ac2f Compare June 12, 2026 09:04
@Issac-Newton Issac-Newton force-pushed the feature/acr-image-config branch from 8acab08 to dcc3f70 Compare June 12, 2026 09:15
@Issac-Newton Issac-Newton force-pushed the feature/start-from-dockerfile branch from 7a6ac2f to 92afac9 Compare June 12, 2026 09:17
@Issac-Newton Issac-Newton force-pushed the feature/acr-image-config branch from dcc3f70 to 3dbb73c Compare June 12, 2026 09:41
@Issac-Newton Issac-Newton force-pushed the feature/start-from-dockerfile branch from 92afac9 to 343623a Compare June 12, 2026 09:45
@Issac-Newton Issac-Newton force-pushed the feature/acr-image-config branch 2 times, most recently from b27e2ef to e398eab Compare June 12, 2026 12:05
@Issac-Newton Issac-Newton force-pushed the feature/start-from-dockerfile branch from 343623a to a82bb59 Compare June 12, 2026 12:09
Add AcrConfig (registry + builder_image) dataclasses, GET /acr_config
API returning temporary ACR credentials via GetAuthorizationToken, and
aliyun-python-sdk-cr as an explicit admin dependency.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Issac-Newton Issac-Newton force-pushed the feature/acr-image-config branch from e398eab to edd681b Compare June 12, 2026 12:12
Add Image.from_dockerfile() API for building sandbox images from local
Dockerfiles, with ImageBuilder, ImageRegistry, and BuilderConfig models.
Includes user guide docs (en + zh-Hans) and SDK-side /acr_config
integration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Issac-Newton Issac-Newton force-pushed the feature/start-from-dockerfile branch from a82bb59 to ca74efd Compare June 12, 2026 12:13
@Issac-Newton Issac-Newton force-pushed the feature/acr-image-config branch from edd681b to e2b6cca Compare June 15, 2026 07:24
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.

1 participant