本仓库包含多个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内部使用的端口号 |
4.3.1 启动顺序(Che工作空间内)
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 ./...
构建指定Broker二进制
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 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
docker search 限制
站内搜不到镜像
离线 save/load
插件要用 plugin install
WSL 拉取慢
安全与 digest
新手拉取配置
镜像合规机制
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
域名连通性排查
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务