最近更新时间:2026-08-06 18:11:06
目前支持:基于公共镜像二次制作自定义镜像。
FROM hub.kce.ksyun.com/ksyun-public/code-base:v20260605
USER root
WORKDIR /home/user/app
# Create a simple index.html as http service content.
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
USER user
EXPOSE 8000
# Do not replace ENTRYPOINT , as it is required by the sandbox to manage the lifecycle of the base service process.
# Put your application startup command in CMD.
ENTRYPOINT ["/usr/local/bin/sandbox-entrypoint.sh"]
CMD ["python", "-m", "http.server", "8000", "--bind", "0.0.0.0"]
纯净模式
