最近更新时间:2026-11-13 17:22:24
公共镜像是星源AgentKit沙箱服务为您提供的标准化基础运行环境。平台预先构建并维护了多种包含主流开发工具和自动化组价的镜像,可实现开箱即用。同时,所有公共镜像均已在底层节点实现预缓存,能大幅提升沙箱实例的启动和就绪速度。本文主要介绍沙箱公共基础镜像的选型建议及镜像地址。
已获取金山云控制台账号与密码。
登录星源AgentKit平台,在左侧导航栏,选择 沙箱Sandbox > 镜像管理。
在镜像管理页面,选择公共镜像页签,即可查看当前所有镜像的基本信息。
镜像类型 | 镜像地址 | 镜像版本/描述 |
|---|---|---|
Code |
| |
AIO |
| |
浏览器 |
|
若公共镜像无法满足您的业务需求,需安装额外的业务代码、特定工具等,可通过编写Dockerfile的方式,在公共镜像的基础上进行改造,示例如下:
FROM hub.kce.ksyun.com/sandbox/aio:v20261014
# Optional: user is the default. Set root only when the application must run with root privileges.
# ENV SANDBOX_APP_USER=user
# ENV SANDBOX_APP_USER=root
WORKDIR /home/user/app
RUN printf '%s\n' \
'<!doctype html>' \
'<html><body><h1>user http service on port 8000</h1></body></html>' \
> index.html \
&& chown -R user:user /home/user/app
EXPOSE 8000
# No USER or SANDBOX_APP_USER is required. The inherited base starts this
# entrypoint as root, then runs CMD as user by default. Do not add `USER user`:
# Docker would also start this ENTRYPOINT as user and sandbox initialization
# would fail. Use SANDBOX_APP_USER to control only the CMD identity.
ENTRYPOINT ["/usr/local/bin/sandbox-entrypoint.sh"]
CMD ["python", "-m", "http.server", "8000", "--bind", "0.0.0.0"]