全部文档
当前文档

暂无内容

如果没有找到您期望的内容,请尝试其他搜索词

文档中心

沙箱公共镜像

最近更新时间:2026-08-27 19:36:43

沙箱公共基础镜像

目前支持:基于公共镜像二次制作自定义镜像。若只需要使用envd和code-interpreter,推荐基于轻量镜像code-lite和envd制作。若需要使用完整调试工具,可基于code-base/browser-base/aio-base镜像制作。

基础镜像地址:

使用示例

FROM hub.kce.ksyun.com/ksyun-public/aio-base:v20260827

# 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"]
FROM hub-vpc-cn-beijing-6.kce.ksyun.com/ksyun-public/envd:v20260824

USER root
WORKDIR /home/user/app

RUN printf '%s\n' \
    '<!doctype html>' \
    '<html><body><h1>custom app from envd-base</h1></body></html>' \
    > index.html \
    && chown -R user:user /home/user/app

EXPOSE 8000
# Do not replace the inherited ENTRYPOINT , as it is required by the sandbox to manage the lifecycle of the base service process.
# Put your application startup command in CMD.
CMD ["python", "-m", "http.server", "8000", "--bind", "0.0.0.0"]

文档导读
纯净模式常规模式

纯净模式

点击可全屏预览文档内容
文档反馈