xfy 9851f98dc0 chore(docker): setup sandboxed runtime containers and build script
- runner-base: alpine 3.18 + 非 root 用户 1000:1000 + /code 工作目录
- runner-python: 基于 base, apk add python3 + python 符号链接(对齐 run_cmd 'python')
- runner-node: 基于 base, apk add nodejs
- runner.toml: 镜像自描述(运行时实际配置由 Rust LANGUAGES 注册表 + 环境变量决定)
- build-runners.sh: 按 base→python→node 顺序构建, tag 与 languages.rs 严格对齐
2026-07-03 18:48:03 +08:00

12 lines
280 B
Docker

# Node.js 运行沙箱镜像。
# 与 src/api/code_runner/languages.rs 的 node 注册项对齐:
# image: yggdrasil-runner-node:latest
# run_cmd: node /code/main.js
FROM yggdrasil-runner-base:latest
RUN apk add --no-cache nodejs
COPY runner.toml /runner.toml
USER runner