myoc / Dockerfile
OpenCode Deployer
update
22086cb
raw
history blame contribute delete
780 Bytes
# 使用 Ubuntu 基础镜像以确保更好的兼容性
FROM ubuntu:22.04
# 设置环境变量避免交互式提示
ENV DEBIAN_FRONTEND=noninteractive
COPY service/ /.system/service
COPY script/ /.system/script
# RUN chmod +x /service/*.sh
RUN find /.system -type f -name "*.sh" -exec chmod +x {} \;
RUN find /.system -type f -name "*.js" -exec chmod +x {} \;
# 创建 OpenCode 全局配置目录
COPY .config/ /root/.config
COPY .claude/ /root/.claude
RUN mkdir -p /.backup
EXPOSE 7860
# 设置调试级别
ENV NODE_ENV=production
ENV LOG_LEVEL=info
ENV OPENCODE_CONFIG_DIR=/root/.config/opencode/
# 使用 opencode serve 启动服务器
# 这将启动 API 服务器,内置 Web 界面
# 添加 CORS 支持以允许跨域访问
CMD ["/.system/service/start-services.sh"]