-
Notifications
You must be signed in to change notification settings - Fork 94
Expand file tree
/
Copy pathDockerfile.wga-sandbox-base
More file actions
54 lines (45 loc) · 1.59 KB
/
Dockerfile.wga-sandbox-base
File metadata and controls
54 lines (45 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
FROM enterprise-public-cn-beijing.cr.volces.com/vefaas-public/all-in-one-sandbox:1.0.0.152
# 该Dockerfile参考:
# https://sandbox.agent-infra.com/zh/blog/announcing-0
# 镜像会以 -e USER=root 启动,因此这里指定root,后续都以此setup
USER root
# ----------------------
# 安装额外系统依赖(若有)
# installed path: /usr/bin/*
# ----------------------
# RUN set -eux; \
# apt-get update; \
# apt-get install -y --no-install-recommends \
# ${your_system_dep} \
# --no-install-recommends; \
# # clean up
# apt-get clean && \
# rm -rf /var/lib/apt/lists/*;
# opencode 安装
RUN curl -fsSL https://opencode.ai/install | bash -s -- --version 1.4.11
ENV PATH="/root/.opencode/bin:${PATH}"
# ----------------------
# npm 安装(若有)
#
# ----------------------
# RUN npm i -g ${your_npm_package}
# ----------------------
# python pip 安装(若有)
# installed path: /usr/local/bin/*
# ----------------------
# RUN pip install ${your_python_package}
# 添加自定义 Server 服务
# COPY ./supervisord.agent_server.conf /opt/tiger/run/supervisord/agent_server.conf
# 绑定 Nginx 路由
# COPY ./nginx.agent_server.conf /opt/gem/nginx/nginx.agent_server.conf
# opencode serve 服务配置
RUN printf '[program:opencode]\n\
command=opencode serve --port 4096 --hostname 0.0.0.0 --print-logs\n\
autorestart=true\n\
priority=800\n\
user=root\n\
stdout_logfile=%%(ENV_LOG_DIR)s/opencode.log\n\
stdout_logfile_maxbytes=10MB\n\
stdout_logfile_backups=5\n\
redirect_stderr=true\n' > /opt/gem/supervisord/opencode.conf
RUN mkdir -p /home/root/workspace