本仓库包含多个Che插件Broker的实现,主要用于Eclipse Che环境中插件的生命周期管理。这些Broker负责插件的下载、解析、配置评估、依赖处理及部署协调,确保插件在Che工作空间中正确集成(如部署至sidecar容器或本地目录),是Che插件生态的核心组件。
che-plugin.yaml的配置,结合工作目录(或通过参数指定路径)下config.json(包含插件/编辑器元数据meta.yaml信息),评估Che工作空间sidecar配置。dependencies.yaml中指定的依赖文件/目录至目标位置。.theia格式的插件归档文件,支持Theia插件在Che工作空间中的本地或远程部署,具体流程:
.theia归档解压至临时目录。package.json:
{"engines.cheRuntimeContainer"}字段,则以此值作为远程插件sidecar的容器镜像;若缺失或为空,则判定为非远程插件。.theia文件复制至/plugins/目录。.theia目录复制至/plugins/目录,并生成sidecar配置,包括:
port<port>的端点。THEIA_PLUGIN_REMOTE_ENDPOINT_<plugin_publisher_and_name>(值为ws://port<port>:<port>,其中<plugin_publisher_and_name>取自package.json)。THEIA_PLUGIN_ENDPOINT_PORT(值为分配的端口)。/plugins/目录内容,确保插件目录初始状态一致。| Broker类型 | 参数说明 | 示例值 |
|---|---|---|
| che-plugin-broker | config.json文件路径(通过Broker参数指定) | --config-path /custom/config.json |
| theia-plugin-broker | 远程插件端口范围 | 4000-6000(默认) |
| 环境变量名称格式 | 作用域 | 说明 |
|---|---|---|
THEIA_PLUGIN_REMOTE_ENDPOINT_<plugin_publisher_and_name> | 工作空间级 | 远程插件WebSocket端点地址,格式为ws://port<port>:<port> |
THEIA_PLUGIN_ENDPOINT_PORT | sidecar级 | 远程插件sidecar内部使用的端口号 |
init-plugin-broker清理/plugins/。
shelldocker run --rm -v /path/to/plugins:/plugins eclipse/init-plugin-broker:latest
che-plugin-broker处理tar.gz插件包。
shelldocker run --rm -v /path/to/plugins:/plugins -v /path/to/config:/config \ eclipse/che-plugin-broker:latest --config-path /config/config.json
theia-plugin-broker处理.theia插件包。
shelldocker run --rm -v /path/to/plugins:/plugins -v /path/to/theia-archive:/archive \ eclipse/theia-plugin-broker:latest /archive/plugin.theia
shellCGO_ENABLED=0 GOOS=linux go build -a -ldflags '-w -s' -a -installsuffix cgo ./...
shellCGO_ENABLED=0 GOOS=linux go build -a -ldflags '-w -s' -a -installsuffix cgo -o che-plugin-broker brokers/che-plugin-broker/main.go
shellCGO_ENABLED=0 GOOS=linux go build -a -ldflags '-w -s' -a -installsuffix cgo -o theia-plugin-broker brokers/theia-plugin-broker/main.go
shellCGO_ENABLED=0 GOOS=linux go build -a -ldflags '-w -s' -a -installsuffix cgo -o init-plugin-broker brokers/init/main.go
shellgo test -v -race ./...
shellgolangci-lint run -v
shelldocker build -f Dockerfile.CI .
vendor目录和依赖锁文件,并提交变更:
shelldep ensure
dep ensure不会自动修改Gopkg.toml(依赖约束文件),需手动更新以反映依赖变更。shelldocker build -t eclipse/che-plugin-broker:latest -f Dockerfile.cpb .
shelldocker build -t eclipse/theia-plugin-broker:latest -f Dockerfile.tpb .
shelldocker build -t eclipse/init-plugin-broker:latest -f Dockerfile.ipb .
来自真实用户的反馈,见证轩辕镜像的优质服务
免费版仅支持 Docker Hub 加速,不承诺可用性和速度;专业版支持更多镜像源,保证可用性和稳定速度,提供优先客服响应。
免费版仅支持 docker.io;专业版支持 docker.io、gcr.io、ghcr.io、registry.k8s.io、nvcr.io、quay.io、mcr.microsoft.com、docker.elastic.co 等。
当返回 402 Payment Required 错误时,表示流量已耗尽,需要充值流量包以恢复服务。
通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。
先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。
使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。
探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
在 Linux 系统配置镜像加速服务
在 Docker Desktop 配置镜像加速
Docker Compose 项目配置加速
Kubernetes 集群配置 Containerd
在宝塔面板一键配置镜像加速
Synology 群晖 NAS 配置加速
飞牛 fnOS 系统配置镜像加速
极空间 NAS 系统配置加速服务
爱快 iKuai 路由系统配置加速
绿联 NAS 系统配置镜像加速
QNAP 威联通 NAS 配置加速
Podman 容器引擎配置加速
HPC 科学计算容器配置加速
ghcr、Quay、nvcr 等镜像仓库
无需登录使用专属域名加速
需要其他帮助?请查看我们的 常见问题 或 官方QQ群: 13763429